Guild icon
Casio Calculator Hacking
Technical / emulation
Avatar
first
Avatar
Second
Avatar
月滝滝猫 9/4/2023 4:09 PM
wow
Avatar
GammaVelorum 9/4/2023 6:00 PM
finally
Avatar
月滝滝猫 9/5/2023 12:11 AM
WSL took me a whole night, then I quickly relized that I'm currently using WSL1. No wonder I cannot use WSLg.
Avatar
But WSLv2 is a virtual machine. It is less "cool" than native code.
😃 1
👍 1
Avatar
The Administrator 9/6/2023 7:52 AM
instead of manually creating a labels file that maps to the ki:ko buttons, for most fx-es plus you will be able to do this kb/codes/fxesplus.txt is universal keycodes names for all fx-es plus calculator
Avatar
and CWI too
7:54 AM
CWII is different
Avatar
The Administrator 9/6/2023 7:55 AM
keyOffset points to something in the rom
7:55 AM
I think a rom analysis approach to things is underrated
Avatar
@Delta in my frontend for some reason the DSR is always 0, but everything still works fine i tried regs.dsr and cur_dsr but they all say 0
Avatar
i just re-tested delta's emu with fx-570ES+ real rom and the keyboard magically worked again, that's nice
7:43 AM
however it seems to have the same symptoms as life's emu, no blinking cursor and nothing displaying in math mode
7:43 AM
oh wait... maybe i'm using wrong emulator?
7:43 AM
yeah actually i am
7:43 AM
nvm
Avatar
ok so it looks like f_0B2E0 should be called
8:07 AM
but on delta's emu it never gets called
8:08 AM
on users emu it gets called when i hold down a key
Avatar
Delta just hooks the getkey function so maybe that's the reason
Avatar
i think he only hooks it in his frontend
8:14 AM
my frontend doesn't
Avatar
Avatar
ArNeKJ
Delta just hooks the getkey function so maybe that's the reason
Why do you keep saying this
8:19 AM
I don't hook getkey
Avatar
Oh sorry
Avatar
I have never hooked getkey
8:19 AM
I hooked render (edited)
8:20 AM
The way I do it makes my sim slow
Avatar
Sorry, I might have memorized it wrong
Avatar
If you spam a key, you can pretty much stall the sim
8:21 AM
Is fine
Avatar
this code may be the problem i had to edit it a bit since my disassembler is a bit wrong 0:B1CCH F00146A6 BL f_046A6 0:B1D0H A011 TB R0.1 0:B1D2H C907 BEQ +EH 0:B1D4H F00147F2 BL f_047F2 0:B1D8H 7000 CMP R0, #00H 0:B1DAH C80E BNE +1CH 0:B1DCH F0014686 BL f_04686 0:B1E0H CEF5 BAL -16H (edited)
Avatar
ok so it looks like when you hold a key down, bit 1 of 00:F014H is set
8:53 PM
time to find the function that actually sets the bit
8:54 PM
no actually that address should be set on startup
8:55 PM
nope still wrong
8:55 PM
i used my simu8 frontend to test...
8:56 PM
ah i remember
8:56 PM
enderfire said to patch the memory read function so 00:F014H always reads 2
Avatar
also i wonder what 00:F014H is used for?
9:09 PM
probably some delay-related things
Avatar
hmm
# 0xF014 When it is set to 0: - If within approx. 0.5 seconds (= cursor flash time) there is no button pressed, this have a value of 20. - If there is any button pressed, this have a value of 02 In any case, the CPU is woken from STOP mode.
Avatar
YES!!! HAHAHAHA
12:15 PM
it was in fact 00:F014H
12:16 PM
first when STOP mode is disabled, you have to set 00:F014H to 0x20
12:16 PM
then when more or more keys are held down, you set this address to 2
12:18 PM
now i just need delta to actually set DSR
12:22 PM
WTF // DSR Prefix Instruction void instr_dsr(struct u8_core *core, uint8_t flags, struct u8_oper *op0, struct u8_oper *op1) { core->cur_dsr = oper_read(core, op0); u8_step(core); core->cur_dsr = 0; }
12:22 PM
why set DSR to 0???
12:22 PM
also somehow the emu still calculates the checksum correctly (edited)
12:22 PM
hmm
12:26 PM
output of grep -r "dsr" . in src/core in u8_emu repo (edited)
12:27 PM
12:32 PM
of course i may be printing the wrong variable
Avatar
now i just need some interrupts
12:47 PM
:)
Avatar
the way the memory read/write function in delta's core checks if a certain address is in a certain range is very flawed. it uses addr_m and addr_v which are supplied in memory region structs. it takes the memory address, ANDs it with the value of addr_m, then if the result is equal to addr_v then the memory address is in that region. i need to make 8E00H - EFFFH read only so i need to find appropriate values for addr_m and addr_v. but its hard af.
Avatar
@Delta
5:24 PM
help?
Avatar
Ah that, there is no way to get that range
5:26 PM
I'll change it to a simple upper and lower bound
Avatar
Avatar
Steveyboi
WTF // DSR Prefix Instruction void instr_dsr(struct u8_core *core, uint8_t flags, struct u8_oper *op0, struct u8_oper *op1) { core->cur_dsr = oper_read(core, op0); u8_step(core); core->cur_dsr = 0; }
Because if you don't specify
5:27 PM
Then the used dsr is 0
Avatar
oh i see
5:28 PM
but you don't set the DSR variable?
Avatar
You are right, I forgot to set the dsr
5:28 PM
Yes
5:29 PM
It never actually uses DSR: so it works anyways lol
Avatar
月滝滝猫 9/10/2023 6:46 PM
I recently updated my repo, supporting ClassWiz models (e.g. fx-880BTG and fx-JP900CW).
Avatar
ok
6:47 PM
you modded users emu, yes?
Avatar
月滝滝猫 9/10/2023 6:47 PM
https://github.com/takinekotfs/CASIO-fx Big thanks to @Steveyboi and @happy sheep
Suite of CASIO calculator tools and source code for CASIO-fx models. - GitHub - takinekotfs/CASIO-fx: Suite of CASIO calculator tools and source code for CASIO-fx models.
Avatar
Avatar
Steveyboi
you modded users emu, yes?
月滝滝猫 9/10/2023 6:47 PM
just rebranding the repo.
Avatar
be careful, casio may come your way :)
Avatar
Avatar
Steveyboi
be careful, casio may come your way :)
月滝滝猫 9/10/2023 6:49 PM
🙂 CASIO cannot touch me =))
Avatar
also that repo is private for a reason
Avatar
月滝滝猫 9/10/2023 6:49 PM
Better, they should not touch me (I mean CASIO) =))
Avatar
Avatar
月滝滝猫
🙂 CASIO cannot touch me =))
they touched the OG creator of that classwiz emulator
Avatar
Avatar
Steveyboi
also that repo is private for a reason
月滝滝猫 9/10/2023 6:49 PM
Oh It is still safe (edited)
6:49 PM
The private repo
Avatar
happy sheep 9/10/2023 6:50 PM
hmmm they can send github a dmca request
Avatar
月滝滝猫 9/10/2023 6:50 PM
but the public still here, just copy the file
Avatar
Avatar
happy sheep
hmmm they can send github a dmca request
月滝滝猫 9/10/2023 6:50 PM
yes. but casio should not touch me
Avatar
should? they will
😃 1
Avatar
月滝滝猫 9/10/2023 6:50 PM
You know the reason, right?
Avatar
of course
6:50 PM
copyrighted code and roms
6:50 PM
how can you not get away
6:51 PM
with that hella copyrighted shid
Avatar
Avatar
Steveyboi
with that hella copyrighted shid
月滝滝猫 9/10/2023 6:51 PM
Well...
6:51 PM
I marked with OSS license, and with some contracts at the back-end btw
Avatar
not gonna save you
Avatar
月滝滝猫 9/10/2023 6:52 PM
So they still can, but soonly they will remove this DMCA, whatever...
6:52 PM
Let me see...
Avatar
Avatar
Steveyboi
not gonna save you
月滝滝猫 9/10/2023 6:55 PM
maybe...
Avatar
Who give you the confidence that CASIO "shouldn't touch you"
7:19 PM
You are listing copyrighted material there, that's enough for them to take down your repo/website/whatever
Avatar
how hard is implementing interrupts? 😇
7:36 PM
just asking
Avatar
It's very very easy, to be honest
7:49 PM
You just make the main loop check for IRQs, and accept them when possible
7:49 PM
GLHF with cycle-accurate emulations, lol
Avatar
i read from the docs in users fxesplus repo and it looks like IRQs take the form of SFRs, 00:F011H to 00:F01FH
7:52 PM
not sure if its the same in the ML610901 (and other similar chips)
Avatar
CASIO didn't make use of IRQs though
Avatar
huh
7:57 PM
then how did they send the NMI interrupt?
Avatar
Probably an external pin
7:59 PM
[ON] key is not in the key matrix - It's connected to NMI pin of the chip
Avatar
def core_reset(self): self.sim.core.regs.elr[1] = self.sim.core.regs.pc self.sim.core.regs.ecsr[1] = self.sim.core.regs.csr self.sim.core.regs.epsw[1] = self.sim.core.regs.psw self.sim.core.regs.psw |= 2; self.sim.core.regs.psw &= -2 self.sim.core.regs.csr = 0 self.sim.core.regs.pc = self.nmi_addr here i tried to see what happens if ON key triggers an NMI interrupt
8:27 PM
nothing interesting
8:28 PM
it doesn't even reset
Avatar
Oh ummmm I remembered it wrong
8:29 PM
Maybe [ON] is connected to RESET pin...
Avatar
also the timer works most of the time
8:30 PM
sometimes i see the casio logo
8:30 PM
and [SHIFT] [AC] shows the casio logo then immediately turns on again
8:30 PM
should not happen
Avatar
check STOP mode thing
Avatar
don't see anything wrong with stop mode
8:32 PM
also enderfire's emu also has the same problem
8:32 PM
i have to go now, will come back later
Avatar
when STOP mode is triggered, the CPU clock is stopped
8:43 PM
But timer keeps going
8:44 PM
So that can create an interrupt
Avatar
ok so i see here, in shutdown, after the casio logo, it calls f_04680 which is in the middle of delay, specifically at the part where STPACP and SBYCON are set. however on delta's core, the timer is already past the target at this point so STOP mode is never enabled...
7:08 AM
i just looked at users emu, it looks like the timer does still keep going
7:08 AM
but it cannot wake the CPU up from stop mode
7:08 AM
hmm
Avatar
i wonder how casio makes their emulators super fast.
9:39 AM
even though it's actual emulation
Avatar
Avatar
Steveyboi
i wonder how casio makes their emulators super fast.
It's not hard, we have LUTs after all
Avatar
btw this is an example of fake emulation
😬 1
Avatar
i wanna make my frontend faster
9:55 AM
also please don't tell me to switch to C
Avatar
Switch to c xoxo
Avatar
Avatar
Steveyboi
also please don't tell me to switch to C
月滝滝猫 9/11/2023 11:33 AM
use c++
11:33 AM
like me
Avatar
Ewwwww c++
kindasus 1
Avatar
Avatar
Delta
Ewwwww c++
月滝滝猫 9/11/2023 7:32 PM
man
7:32 PM
why? you hate C++?
Avatar
C better
😃 1
7:33 PM
headers will always prevail
Avatar
月滝滝猫 9/11/2023 8:46 PM
New banner btw
Avatar
#emulation is for discussions about... well, emulations, not UI designs and banners
👍 1
Avatar
Avatar
Steveyboi
C better
GammaVelorum 9/11/2023 8:58 PM
me (rust user) trying my best not to bring rust into the discussion:
Avatar
GammaVelorum 9/11/2023 8:59 PM
of course i respect c though
Avatar
It's all about preferences
Avatar
GammaVelorum 9/11/2023 8:59 PM
i use rust because its the only thing i know
Avatar
Performance is not of an impact here
Avatar
GammaVelorum 9/11/2023 8:59 PM
agree
Avatar
Well I heard that Rust is pretty fast somewhere
Avatar
Avatar
GammaVelorum
i use rust because its the only thing i know
GammaVelorum 9/11/2023 9:00 PM
*only thing i know thats fast
Avatar
Avatar
ArNeKJ
Well I heard that Rust is pretty fast somewhere
GammaVelorum 9/11/2023 9:00 PM
no garbage collector i think
Avatar
I thought C is fast until I wrote my emulator 🤣
Avatar
GammaVelorum 9/11/2023 9:00 PM
but like good c code will still be faster than bad rust code
9:01 PM
rust isnt some sort of magic
Avatar
Good code should be faster than bad code
9:01 PM
Yeah Delta's emulator is also in C & is fast AF
9:01 PM
I don't know how I managed to make something in C that runs slower than Java 🤣
Avatar
GammaVelorum 9/11/2023 9:02 PM
well at least not slower than python
Avatar
Actually it could
Avatar
GammaVelorum 9/11/2023 9:02 PM
that would be quite the achievement
Avatar
Avatar
ArNeKJ
Yeah Delta's emulator is also in C & is fast AF
ehhhh, it's not that fast
Avatar
A lot faster than mine
9:02 PM
Also faster than real calculator
9:03 PM
Imagine porting my emulator to Z80 assembly and running at 1% of real calc speed on a TI-84 Plus (edited)
Avatar
ah, speed
9:03 PM
so what language
Avatar
methamphetamine
Avatar
[REDACTED] iosmoai (edited)
Avatar
Avatar
Steveyboi
so what language
GammaVelorum 9/11/2023 9:04 PM
guys lets write emulator in mojo
Avatar
mojo?
Avatar
GammaVelorum 9/11/2023 9:04 PM
"i am the one who meths"
Avatar
the kolbe's electrolysis between benzoic acid and alanine should result in diphenyl, 2,3-diaminebutane and amphetamine
9:04 PM
both are very easy to find
Avatar
cheap too
Avatar
The heck are you talking about
Avatar
synthetic route to amphetamine
Avatar
1. python 2. C 3. java 4. C++ (edited)
9:05 PM
crossed out langs are the ones idk
Avatar
I don't wanna get banned
9:05 PM
in Minecraft
9:05 PM
problem solved
Avatar
Avatar
Steveyboi
1. python 2. C 3. java 4. C++ (edited)
which one
Avatar
I know a bit of C, Python and Java
9:06 PM
But I cannot write good code at all 💀
Avatar
GammaVelorum 9/11/2023 9:06 PM
me watching as 3 mods discuss programming languages and meth in front of me (edited)
Avatar
Avatar
Steveyboi
1. python 2. C 3. java 4. C++ (edited)
I Like Tortoises🐢🐢 9/11/2023 9:06 PM
⬆️ 1
Avatar
I don't want to be a moderator aaaAAAAAA (edited)
Avatar
MINECRAFT COMMAND BLOCKS???
9:06 PM
WTF
Avatar
Avatar
ArNeKJ
I don't want to be a moderator aaaAAAAAA (edited)
i would love to be admin
Avatar
C++ is like ancient spells
Avatar
Java syntax is easier for me to understand
Avatar
Avatar
Delta
Click to see attachment 🖼️
GammaVelorum 9/11/2023 9:07 PM
dude i was watching gameplay videos of this just now
9:08 PM
hilarious game
Avatar
Oh um, maybe we should move to #general or something
Avatar
GammaVelorum 9/11/2023 9:08 PM
off topic
Avatar
yeah that
Avatar
Avatar
GammaVelorum
dude i was watching gameplay videos of this just now
Avatar
#include <iostream> int main() { std::cout << "Hello, world!\n"; return; } vs. #include <stdio.h> int main() { printf("Hello, world!\n"); return; }
Avatar
incorrect (edited)
9:09 PM
you have defined it as returning int
Avatar
using namespace std;
Avatar
but you do not return a value
9:09 PM
-Wall would catch that
Avatar
Avatar
Delta
but you do not return a value
return value is in AX/EAX/rAX anyway (edited)
Avatar
but the value is undefined
Avatar
well ig that's my C/C++ skills
Avatar
change it to void or return 0
Avatar
GammaVelorum 9/11/2023 9:11 PM
bro became the compiler
Avatar
lol
9:11 PM
so
9:11 PM
what language
9:11 PM
should i use
Avatar
ld hl, strHello rst 38h dw ti.PutS ret strHello: db "Hello World!", 0
9:11 PM
use Z80 assembly
Avatar
Avatar
Steveyboi
should i use
GammaVelorum 9/11/2023 9:12 PM
are u willing to learn something new
9:12 PM
i heard golang was a thing
Avatar
nope
Avatar
if you say rust I swear to god
Avatar
GammaVelorum 9/11/2023 9:12 PM
ight
Avatar
boooooriiiing
9:12 PM
go read intel manual volume 3
9:12 PM
hand assemble your code
Avatar
LOL no
9:12 PM
AMD manual FTW
Avatar
GammaVelorum 9/11/2023 9:12 PM
broing
Avatar
brojob
Avatar
AMD invented AMD64 architecture
Avatar
GammaVelorum 9/11/2023 9:13 PM
i manually use magnetic needles to flip bits
Avatar
IA-64 is ded
Avatar
Avatar
GammaVelorum
i manually use magnetic needles to flip bits
M-x butterfly
Avatar
so what should i choose 1. python 2. C 3. C++ 4. java 5. rust 6. golang 7. brainfu- wait no 8. some other language idk
Avatar
malbodge
9:13 PM
Avatar
Avatar
Steveyboi
so what should i choose 1. python 2. C 3. C++ 4. java 5. rust 6. golang 7. brainfu- wait no 8. some other language idk
C, or C++ if you know how to program in C++
9:14 PM
C++ is like another language disguised as C dialect to me (edited)
Avatar
Avatar
Delta
Click to see attachment 🖼️
ah yes vi vs. emacs
Avatar
Avatar
ArNeKJ
C++ is like another language disguised as C dialect to me (edited)
ehhhhhhhhh
9:14 PM
I don't like C++ personally (edited)
9:14 PM
but that's not a good way to treat it
Avatar
I don't know C++ so no comments
Avatar
I would choose Java if I have to do OOP things
Avatar
google "recursion"
Avatar
yeah know that
Avatar
Avatar
ArNeKJ
I would choose Java if I have to do OOP things
I choose java for minecraft only lol
Avatar
minecraft java vs. minecraft c++?
Avatar
Bedrock sux
Avatar
java edition is the only true minecraft version
Avatar
microsoft ain't gonna fool you
Avatar
I only play modded at this point
Avatar
i use cracked minecraft to this day
Avatar
Me: plays Vanilla minecraft, but only on PVP servers
Avatar
me: plays singleplayer only because... cracked minecraft
Avatar
holy [REDACTED] I've been talking about non-emulation things in this channel for so long
Avatar
yeah
9:17 PM
too off-topic
9:18 PM
leave
Avatar
no, i cannot leave. i am mod here
9:22 PM
now
9:22 PM
back to on-topic
Avatar
You can try to write one in Python
9:23 PM
Speed is not what matters here, plus I think an emulator in Python wouldn't be so slow that it becomes unusable (edited)
Avatar
GammaVelorum 9/11/2023 9:23 PM
actually an emulator in python wont be terribly slow either
Avatar
At least it could be a good practice
Avatar
GammaVelorum 9/11/2023 9:24 PM
although if i need speed and convenience im gonna take lua and slap on a standard library
Avatar
Lua is hard
9:34 PM
To me, it feels like it's harder than Python (edited)
Avatar
users emu uses lua
9:34 PM
partially
9:37 PM
now
9:37 PM
@Delta
9:37 PM
9:37 PM
implement it
9:37 PM
should be ez right?
Avatar
wah wah
9:37 PM
probably
9:37 PM
Fine
Avatar
Avatar
ArNeKJ
using namespace std;
月滝滝猫 9/11/2023 9:48 PM
no
9:48 PM
plz
9:48 PM
dont use this
Avatar
c++ tutorials use it
9:48 PM
also saves space
Avatar
I don't know C++, but yeah I heard that such usage is deprecated
Avatar
i hate having to do std:: all the time
Avatar
Avatar
ArNeKJ
I don't know C++, but yeah I heard that such usage is deprecated
huh
Avatar
namespace conflicts, I guess
⬆️ 1
Avatar
it can reduce the filesize
😕 1
9:49 PM
why deprecate it
Avatar
月滝滝猫 9/11/2023 9:50 PM
bruh
Avatar
like, if you happen to have defined your own thing that uses the same name as another thing in std, then others who uses your code might experience bugs (edited)
Avatar
Avatar
ArNeKJ
namespace conflicts, I guess
月滝滝猫 9/11/2023 9:50 PM
yeah, it conflicts a lot (edited)
Avatar
Avatar
Steveyboi
it can reduce the filesize
Well um, you don't need to save up for a few bytes on modern computers (edited)
9:51 PM
Readability should come first, right?
Avatar
yeah its just the same problem as import some_module vs. from some_module import *
Avatar
Avatar
Steveyboi
c++ tutorials use it
月滝滝猫 9/11/2023 9:51 PM
bc these are tutorials, not real life environment
Avatar
crap
Avatar
月滝滝猫 9/11/2023 9:51 PM
just a demo and tests
Avatar
Avatar
Steveyboi
yeah its just the same problem as import some_module vs. from some_module import *
月滝滝猫 9/11/2023 9:52 PM
some_module.inside vs inside
Avatar
in the simu8 frontend i had to name the breakpoint variable brkpoint
Avatar
or else it conflicts with the built-in breakpoint function
Avatar
Avatar
Steveyboi
it can reduce the filesize
月滝滝猫 9/11/2023 9:53 PM
once you compile it, why should you considered about the file size, except you share the sources
Avatar
self.breakpoint
Avatar
that's now
9:54 PM
the brkpoint is in the past
Avatar
月滝滝猫 9/11/2023 9:54 PM
By the way, I want to thank VNPT
9:54 PM
50kb/s is playing
Avatar
Avatar
月滝滝猫
By the way, I want to thank VNPT
for sponsoring this server
🥲 1
Avatar
Avatar
Delta
Click to see attachment 🖼️
月滝滝猫 9/11/2023 9:56 PM
real programmers become a good programmers
9:56 PM
vi and emacs are editors
9:56 PM
~i use vim btw~ (edited)
Avatar
noooo
9:56 PM
i use
9:56 PM
sublime
9:56 PM
text
9:56 PM
and notepad++
9:56 PM
and notepad
Avatar
月滝滝猫 9/11/2023 9:59 PM
i use these
9:59 PM
meh lul
9:59 PM
uhh wait
Avatar
ah i use hxd too
Avatar
月滝滝猫 9/11/2023 9:59 PM
this is not #off-topic-general , isnt it
Avatar
ban time
10:00 PM
jk
Avatar
月滝滝猫 9/11/2023 10:00 PM
trying to remove messages
Avatar
also @Delta rewrite the memory stuff
Avatar
月滝滝猫 9/11/2023 10:03 PM
😲
10:03 PM
wow
Avatar
also ~~strikethrough~~ -> strikethrough
10:04 PM
2 tildes
10:04 PM
not 1
Avatar
@Steveyboi I've added brk and changed the memory thing ("addr_m", ctypes.c_uint32), ("addr_v", ctypes.c_uint32), needs to be ("addr_l", ctypes.c_uint32), ("addr_h", ctypes.c_uint32), and # Initialise memory self.code_mem = (ctypes.c_uint8 * len(rom))(*rom) self.data_mem = (ctypes.c_uint8 * 0xE00)() self.emu_kb = (ctypes.c_uint8 * 0x30)() self.sfr = (ctypes.c_uint8 * 0x1000)() regions = [ u8_mem_reg_t(u8_mem_type_e.U8_REGION_BOTH, False, 0x00000, 0x07FFF, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.code_mem, 0x00000))), u8_mem_reg_t(u8_mem_type_e.U8_REGION_DATA, True, 0x08000, 0x08E00, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.data_mem, 0x00000))), u8_mem_reg_t(u8_mem_type_e.U8_REGION_DATA, True, 0x08E00, 0x08E30, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.emu_kb, 0x00000))), u8_mem_reg_t(u8_mem_type_e.U8_REGION_DATA, True, 0x0F000, 0x0FFFF, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.sfr, 0x00000))), u8_mem_reg_t(u8_mem_type_e.U8_REGION_CODE, False, 0x08000, 0x0FFFF, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.code_mem, 0x08000))), u8_mem_reg_t(u8_mem_type_e.U8_REGION_BOTH, False, 0x10000, 0x1FFFF, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.code_mem, 0x10000))), u8_mem_reg_t(u8_mem_type_e.U8_REGION_DATA, False, 0x80000, 0x8FFFF, u8_mem_acc_e.U8_MACC_ARR, _acc_union(uint8_ptr(self.code_mem, 0x00000))), ]
10:08 PM
rebuild the core of course
Avatar
self.
10:09 PM
Is that OOP things? 👀 (edited)
10:09 PM
because in theory you could have multiple instances of the core
Avatar
Yes that
10:10 PM
And maybe you will need to set coprocessors
Avatar
haha look at that
10:17 PM
the error display glitch
10:18 PM
the entire stack is trashed, you can see parts of the real rom get copied to the stack
Avatar
y e s s s s s
Avatar
wave 2
8:52 AM
wave 3 does writes right in the F0xxH range, which corrupts some hardware SFRs like the contrast SFR (hence why the screen gets a bit dimmer), and finally it writes to F031H which controls the LCD, effectively turning it off.
8:54 AM
looking at this i think you can see the extent of the corruption.
Avatar
月滝滝猫 9/12/2023 3:17 PM
I recently translating English to Japanese on the happy sheep emulator. However, I only use raw Google Translate, and surely these contain unusual language.
3:18 PM
I will upload my translation to my repo, hope it will finish soon.
3:23 PM
oh dear, excel is trash in saving row txt-based for jp characters.
Avatar
just
3:26 PM
use
3:26 PM
json
😬 1
3:26 PM
or sth
Avatar
Avatar
月滝滝猫
I will upload my translation to my repo, hope it will finish soon.
upload it to the webemudist repo
3:30 PM
you're basically making a fork
Avatar
Avatar
Steveyboi
json
月滝滝猫 9/12/2023 3:33 PM
nope
Avatar
GammaVelorum 9/12/2023 3:34 PM
even a csv is better
Avatar
later when i get home i will create my own japanese translation
3:34 PM
and upload to webemudist
3:35 PM
you're acting like you're the only one in town
Avatar
GammaVelorum 9/12/2023 3:35 PM
whats webemudist
Avatar
its the "community mod" on caduo
Avatar
Avatar
GammaVelorum
even a csv is better
月滝滝猫 9/12/2023 3:37 PM
No, it's now a whole trash
Avatar
get used to notepad++ or sth
Avatar
Avatar
Steveyboi
get used to notepad++ or sth
月滝滝猫 9/12/2023 3:37 PM
Using Notepad++ currently (edited)
Avatar
nice
Avatar
月滝滝猫 9/12/2023 3:38 PM
But uhh...
Avatar
MODIFY THE GOD DANG INDEX HTML FILE
Avatar
月滝滝猫 9/12/2023 3:38 PM
Notepad++ renders japanese as ??????
Avatar
why can't you do that??????
Avatar
Avatar
Steveyboi
MODIFY THE GOD DANG INDEX HTML FILE
月滝滝猫 9/12/2023 3:38 PM
I can do it
3:38 PM
But
Avatar
Avatar
月滝滝猫
Notepad++ renders japanese as ??????
use utf-8
Avatar
Avatar
Steveyboi
use utf-8
月滝滝猫 9/12/2023 3:38 PM
Yes
3:38 PM
lol
3:39 PM
i changed my windows language to jp
3:39 PM
hope that's help
Avatar
check if you are using shift jis
Avatar
Avatar
月滝滝猫
i changed my windows language to jp
doesn't help
3:39 PM
for example you cannot install japanese theme packs even if you changed to japanese on english windows
3:40 PM
its because of the non-unicode language setting
Avatar
月滝滝猫 9/12/2023 3:40 PM
😂
Avatar
somewhere in the region settings
Avatar
月滝滝猫 9/12/2023 3:40 PM
guess I will fix this soon.
3:42 PM
Seems like you know nothing about formatting CSV structure.
3:48 PM
nice su, notepad++ got it
Avatar
月滝滝猫 9/12/2023 4:00 PM
new language
4:00 PM
japanese
4:00 PM
😂 (edited)
4:04 PM
Suite of CASIO calculator tools and source code for CASIO-fx models. - Comparing master...japanese-translation · takinekotfs/CASIO-fx
4:04 PM
maybe... French on play...
Avatar
now
4:31 PM
contribute to the webemudist repo
4:32 PM
or take that thing off your repo
Avatar
happy sheep 9/12/2023 6:40 PM
well i used CloudFlare's WAF rules to block all traffic from Japan, preventing possible access from Casio to e.caduo.eu.org
😃 1
6:41 PM
btw i don't think localization done by non-natives is accurate enough
⬆️ 1
6:47 PM
if it's done by google translate, just write a script call the google translate API so can support hundreds of languages
⬆️ 1
Avatar
Avatar
Steveyboi
contribute to the webemudist repo
月滝滝猫 9/12/2023 8:40 PM
He can copy and paste it into his repo btw
8:41 PM
(I only have 50kb/s network so far, cannot do much thing)
Avatar
Avatar
happy sheep
if it's done by google translate, just write a script call the google translate API so can support hundreds of languages
月滝滝猫 9/12/2023 8:41 PM
not recommended for offline uses
Avatar
Avatar
Steveyboi
or take that thing off your repo
月滝滝猫 9/12/2023 8:42 PM
I won't do anything that you said, neither.
8:42 PM
The diversity of repositories and each contributor must have their own way to improve the code.
Avatar
Avatar
happy sheep
well i used CloudFlare's WAF rules to block all traffic from Japan, preventing possible access from Casio to e.caduo.eu.org
月滝滝猫 9/12/2023 8:43 PM
Oh that's why your website is still alive dude
Avatar
yeah i'm feeling like you're acting like you're the only one in town
😂 1
8:44 PM
and everybody else has moved on or sth
Avatar
Avatar
Steveyboi
and everybody else has moved on or sth
月滝滝猫 9/12/2023 8:44 PM
Moved? To where?
Avatar
moved on with life of course
Avatar
Avatar
Steveyboi
yeah i'm feeling like you're acting like you're the only one in town
月滝滝猫 9/12/2023 8:45 PM
You're trying to act like that everyone contributing must follow the your way.
Avatar
you're 4 years older than me and yet your english isn't as good as mine
😂 1
Avatar
月滝滝猫 9/12/2023 8:45 PM
If you can, just copy my code, create a pull request on happy sheep repo btw.
8:46 PM
Btw,
Avatar
pull request?
Avatar
Avatar
Steveyboi
pull request?
月滝滝猫 9/12/2023 8:46 PM
Yes
Avatar
i have write access dude
Avatar
Avatar
Steveyboi
i have write access dude
月滝滝猫 9/12/2023 8:46 PM
Then just copy and paste the code
8:46 PM
That's easy dude
Avatar
i will translate myself
👍 1
Avatar
Avatar
Steveyboi
i will translate myself
月滝滝猫 9/12/2023 8:46 PM
Yeah
8:47 PM
Surely you can do this.
8:49 PM
Btw, I'm converting to exe, so you guys don't need to install Python3 before running the application.
8:49 PM
Surely, I'm still testing it
8:50 PM
(Lots of bugs)
Avatar
月滝滝猫 9/12/2023 8:57 PM
(I'm not here to create any more drama, but I'm feeling @Steveyboi wants contributors that are using other people code must obey his strange rules , or remove what all contributors doing on their repos.) (edited)
Avatar
formerly?
Avatar
Avatar
Steveyboi
formerly?
月滝滝猫 9/12/2023 9:08 PM
of what..?
Avatar
yeah i bet you're taking the classwiz emu and turning it into your own
Avatar
Avatar
Steveyboi
yeah i bet you're taking the classwiz emu and turning it into your own
月滝滝猫 9/12/2023 9:09 PM
Nope
9:09 PM
It's ours
Avatar
Avatar
月滝滝猫
(I'm not here to create any more drama, but I'm feeling @Steveyboi wants contributors that are using other people code must obey his strange rules , or remove what all contributors doing on their repos.) (edited)
what strange rules?
Avatar
Avatar
月滝滝猫
It's ours
no it's not, the code is by satgo, happysheep and me
9:10 PM
you're just allowed to use it
Avatar
月滝滝猫 9/12/2023 9:10 PM
Avatar
Avatar
Steveyboi
you're just allowed to use it
月滝滝猫 9/12/2023 9:10 PM
Who said that?
Avatar
sorry
9:10 PM
yes allowed to build something off it
9:10 PM
actually
Avatar
月滝滝猫 9/12/2023 9:10 PM
Even Satgo stars on my repo dude
9:11 PM
He even contributed
9:11 PM
wth are you saying?
Avatar
Avatar
Steveyboi
sorry
月滝滝猫 9/12/2023 9:12 PM
Oh ok I accepted this.
9:12 PM
Hope you see that OSS is just about free-to-use code
9:13 PM
No one can restricted from one another to use the code with no permission
9:13 PM
Even Linus Torvalds (edited)
Avatar
wam what???
Avatar
月滝滝猫 9/12/2023 9:14 PM
When microsoft hated linux, as well as torvard did the same thing, Torvalds cannot deny Ms from using his code for paid products
Avatar
Avatar
Steveyboi
wam what???
月滝滝猫 9/12/2023 9:14 PM
Yeah
9:14 PM
Hackathon
9:14 PM
no reward
9:14 PM
nothing here
9:14 PM
sad
Avatar
probably because you just took ppl's code
Avatar
Avatar
Steveyboi
probably because you just took ppl's code
月滝滝猫 9/12/2023 9:15 PM
lol
Avatar
its not your own
Avatar
月滝滝猫 9/12/2023 9:15 PM
but they agreed
9:15 PM
that's the problem
9:15 PM
They agreed, I improve the code for free, so they can improve their own app based on code improvements
9:16 PM
WHat's wrong with that?
Avatar
It's immoral to neglect people's efforts
Avatar
yay finally some1 to help me destroy this idiot
Avatar
you were taking their code & rebranding it, not giving enough credit
Avatar
Avatar
Steveyboi
yay finally some1 to help me destroy this idiot
uhhhhh
Avatar
月滝滝猫 9/12/2023 9:16 PM
???
9:17 PM
Oh dear, VNPT said I will run out of network data
9:17 PM
they call me
9:17 PM
$5/month for just 1GB/day
Avatar
you using cellular data?
9:17 PM
on a PC?
Avatar
Avatar
Steveyboi
you using cellular data?
月滝滝猫 9/12/2023 9:17 PM
yes
9:17 PM
my school has no wifi
9:18 PM
im in school to complete math questions
Avatar
you're at your school?
Avatar
月滝滝猫 9/12/2023 9:18 PM
;-;
Avatar
Avatar
Steveyboi
you're at your school?
月滝滝猫 9/12/2023 9:18 PM
Yes
9:18 PM
I live in there
9:18 PM
not allowed to go home
Avatar
what
9:18 PM
oh know why
Avatar
月滝滝猫 9/12/2023 9:19 PM
I contribute to OSS to hope that my life is better
9:19 PM
At least that I can do something...
Avatar
you aren't contributing
9:19 PM
you're rebranding
Avatar
月滝滝猫 9/12/2023 9:19 PM
Not just answering useless questions, btw
9:19 PM
;-;
9:20 PM
anyways @Steveyboi , do you ever know why I am rename to ClassWiz Emulator?
Avatar
why you renamed caduo to classwiz emulator?
9:21 PM
its because you don't wanna associate yourself with caduo
9:21 PM
so you renamed it
Avatar
Avatar
Steveyboi
why you renamed caduo to classwiz emulator?
月滝滝猫 9/12/2023 9:21 PM
Because...
Avatar
folder names?
Avatar
月滝滝猫 9/12/2023 9:21 PM
THe classic can emulate old ES calc
Avatar
Avatar
Steveyboi
folder names?
月滝滝猫 9/12/2023 9:22 PM
yes
9:22 PM
the ClassWiz do the cw things
9:22 PM
big differences here (edited)
Avatar
what you should do 1. take your casio repo down 2. properly fork the repos 3. do what you wanna do. just don't create an all-in-one repo (edited)
😂 1
🇳 1
🇴 1
Avatar
GammaVelorum 9/12/2023 9:25 PM
what exactly is happening here?
9:25 PM
if the original repo is licensed then follow the terms and conditions
9:25 PM
if not ask the authors for opinion if possible
Avatar
basically
9:26 PM
this vietnamese dude
Avatar
GammaVelorum 9/12/2023 9:26 PM
if u cant reach them then technically nothings really stopping you from stealing code
Avatar
he's taking users and satgo/happysheep's repo
9:26 PM
and rebranding it
Avatar
GammaVelorum 9/12/2023 9:26 PM
any licensing?
9:26 PM
gpl or mit or bsd or something?
Avatar
well he licensed the repo with GPL3
9:27 PM
the repo
Avatar
GammaVelorum 9/12/2023 9:27 PM
oh ok
Avatar
not the emulators inside tho
Avatar
GammaVelorum 9/12/2023 9:27 PM
wait what
Avatar
月滝滝猫 9/12/2023 9:27 PM
??
Avatar
GammaVelorum 9/12/2023 9:27 PM
if u license the repo youre licensing everything in it
Avatar
ok no just stupid
Avatar
Avatar
GammaVelorum
if u license the repo youre licensing everything in it
月滝滝猫 9/12/2023 9:28 PM
lul even the original devs don't license the repo
Avatar
GammaVelorum 9/12/2023 9:28 PM
still it would be nice to give some credit
Avatar
he did
9:28 PM
yes
Avatar
Avatar
GammaVelorum
still it would be nice to give some credit
月滝滝猫 9/12/2023 9:28 PM
I did
Avatar
GammaVelorum 9/12/2023 9:28 PM
oh
9:28 PM
thats good
Avatar
but he ended up rebranding the emus
Avatar
GammaVelorum 9/12/2023 9:28 PM
so whats the problem here
Avatar
Avatar
GammaVelorum
so whats the problem here
月滝滝猫 9/12/2023 9:28 PM
Still don't know
Avatar
Avatar
Steveyboi
but he ended up rebranding the emus
GammaVelorum 9/12/2023 9:28 PM
like how
Avatar
like he took satgo/happysheep's emu
9:29 PM
its originally called caduo
9:29 PM
he renamed it to classwiz emulator
Avatar
月滝滝猫 9/12/2023 9:29 PM
If you say that the name is the problem, just say that, and let everyone know, then voting
9:29 PM
that's it
Avatar
GammaVelorum 9/12/2023 9:29 PM
did he make any changes to it?
Avatar
well yeah he did
9:29 PM
japanese language
Avatar
GammaVelorum 9/12/2023 9:29 PM
well then i say thats his
9:29 PM
its more of a fork
Avatar
月滝滝猫 9/12/2023 9:29 PM
Never seen anyone annoying much
Avatar
yeah its a fork
Avatar
GammaVelorum 9/12/2023 9:30 PM
but since no license not much can be done
Avatar
月滝滝猫 9/12/2023 9:30 PM
Oi @GammaVelorum look
9:30 PM
Avatar
bro you dumb or sth
9:30 PM
Avatar
月滝滝猫 9/12/2023 9:30 PM
surely that's enough
Avatar
it was already added 7 days ago
kindasus 1
Avatar
GammaVelorum 9/12/2023 9:31 PM
would be better if it was a fork/pull request
9:31 PM
but i'll allow it
9:31 PM
not that big of a problem if u ask me
👍 1
Avatar
月滝滝猫 9/12/2023 9:32 PM
ok hold on
9:32 PM
so the original name of ClassWiz Emulator is WebEmuDist?
Avatar
no
Avatar
月滝滝猫 9/12/2023 9:32 PM
Surely I will rename it
Avatar
Avatar
Steveyboi
no
月滝滝猫 9/12/2023 9:33 PM
then what's it?
9:33 PM
Users ask, then I will follow
Avatar
it doesn't actually have a proper name
😂 2
9:33 PM
it's just a classwiz emulator
9:33 PM
that's it
Avatar
月滝滝猫 9/12/2023 9:33 PM
sh*t
Avatar
GammaVelorum 9/12/2023 9:33 PM
man this is getting stranger by the second
Avatar
月滝滝猫 9/12/2023 9:34 PM
WTF then the folder name is empty @Steveyboi ?
Avatar
no you stupid
Avatar
月滝滝猫 9/12/2023 9:34 PM
How is that allowed on WIndows and Git system? (edited)
Avatar
ah the man is here
Avatar
What in the schizo is happening her3
Avatar
GammaVelorum 9/12/2023 9:34 PM
oh yeah happy sheeps here
Avatar
月滝滝猫 9/12/2023 9:34 PM
Huh?
9:34 PM
Oh yeah
Avatar
GammaVelorum 9/12/2023 9:35 PM
hes the author no?
Avatar
vietnamese guy rebranding caduo classwiz emulator
Avatar
GammaVelorum 9/12/2023 9:35 PM
ask if its ok
Avatar
Avatar
GammaVelorum
hes the author no?
satgo is original author, he just improve it
Avatar
月滝滝猫 9/12/2023 9:35 PM
Hey @happy sheep what's the original name of WebEmuDist?
9:35 PM
ClassWiz Emulator?
Avatar
Avatar
Steveyboi
satgo is original author, he just improve it
GammaVelorum 9/12/2023 9:36 PM
happy sheep seems to be the closest thing to the author rn
Avatar
Avatar
GammaVelorum
happy sheep seems to be the closest thing to the author rn
月滝滝猫 9/12/2023 9:36 PM
yeah
Avatar
happy sheep 9/12/2023 9:36 PM
it was ClassWiz Emulator
😂 1
Avatar
月滝滝猫 9/12/2023 9:36 PM
he's good
Avatar
Avatar
happy sheep
it was ClassWiz Emulator
月滝滝猫 9/12/2023 9:36 PM
lol
9:36 PM
see @Steveyboi
Avatar
so @happy sheep what do you think
Avatar
月滝滝猫 9/12/2023 9:36 PM
what's the rebranding then?
Avatar
happy sheep 9/12/2023 9:36 PM
i have no thought
Avatar
月滝滝猫 9/12/2023 9:37 PM
renaming html header in order to improve css is rebranding?
Avatar
GammaVelorum 9/12/2023 9:37 PM
so you allow it?
Avatar
Avatar
GammaVelorum
so you allow it?
月滝滝猫 9/12/2023 9:37 PM
happy sheep doesn't seem disagree my repo anyways, he is just confused.
9:38 PM
Avatar
GammaVelorum 9/12/2023 9:38 PM
so he knows of the rebranding and he allows it
Avatar
but a proper fork would be better
Avatar
Avatar
GammaVelorum
so he knows of the rebranding and he allows it
月滝滝猫 9/12/2023 9:39 PM
I'm not even rebranding
9:39 PM
lol
Avatar
GammaVelorum 9/12/2023 9:39 PM
bruh then whats going on
Avatar
Avatar
Steveyboi
but a proper fork would be better
月滝滝猫 9/12/2023 9:39 PM
not always
Avatar
happy sheep 9/12/2023 9:39 PM
I neither allow nor disallow
👍 2
Avatar
Avatar
月滝滝猫
not always
wdym not always
Avatar
happy sheep 9/12/2023 9:39 PM
it just, too drama, maybe
Avatar
Avatar
happy sheep
I neither allow nor disallow
GammaVelorum 9/12/2023 9:39 PM
i both seem to understand and not understand
Avatar
Avatar
happy sheep
it just, too drama, maybe
月滝滝猫 9/12/2023 9:39 PM
yeah
Avatar
too much drama
Avatar
月滝滝猫 9/12/2023 9:40 PM
Don't know why I am the target btw
Avatar
this guy just means drama
Avatar
happy sheep 9/12/2023 9:40 PM
it's not a normal way that contribute to a opensource project
Avatar
Avatar
月滝滝猫
Don't know why I am the target btw
you made the all-in-one repo of course
Avatar
Avatar
Steveyboi
you made the all-in-one repo of course
月滝滝猫 9/12/2023 9:40 PM
yes
Avatar
GammaVelorum 9/12/2023 9:40 PM
is an all in one really a bad thing
Avatar
月滝滝猫 9/12/2023 9:40 PM
but all original devs allowed this (edited)
Avatar
GammaVelorum 9/12/2023 9:40 PM
helps gather info
Avatar
happy sheep 9/12/2023 9:40 PM
you surely can do this, i think
Avatar
月滝滝猫 9/12/2023 9:41 PM
are you the original dev of all of them? @Steveyboi
Avatar
no
9:41 PM
of course not
Avatar
月滝滝猫 9/12/2023 9:41 PM
Yeah, then why are you here.
9:41 PM
jesus
Avatar
happy sheep 9/12/2023 9:41 PM
kind of annoying maybe
Avatar
Avatar
happy sheep
kind of annoying maybe
月滝滝猫 9/12/2023 9:41 PM
Yeah
Avatar
GammaVelorum 9/12/2023 9:41 PM
public opinion
Avatar
月滝滝猫 9/12/2023 9:42 PM
I'm very tried right now
Avatar
happy sheep 9/12/2023 9:42 PM
split a project
Avatar
i think we should move to general now
Avatar
月滝滝猫 9/12/2023 9:42 PM
...
9:42 PM
Or #off-topic-general
Avatar
GammaVelorum 9/12/2023 9:42 PM
the only thing im moving is me to my bed i have a test tomorrow
Avatar
Avatar
GammaVelorum
the only thing im moving is me to my bed i have a test tomorrow
月滝滝猫 9/12/2023 9:42 PM
Me too
9:42 PM
quick 15m test
Avatar
Hi guys
6:58 PM
i replace CY-239(fx991cnx)'s core.dat (rom file) with fx991cnx's rom.bin in ClassicEmu/models
6:59 PM
Then I found the emulator seems to be stuck
7:00 PM
Since fx991cnx's real calculator has different rom with the emulator's rom, I have to find a way to load the real rom (in ClassicEmu/models/991cnx)
Avatar
core.dat is encrypted in some way
7:02 PM
we're not sure how
7:02 PM
and it's a pita to reverse engineer because the WASM is obfuscated (edited)
7:03 PM
if it's trying to decrypt rom.bin when it's not encrypted, it'll just get garbage
7:03 PM
also real and emulator ROMs are not interchangeable that easily
7:03 PM
the emulator needs to be modified
7:03 PM
certain SFRs need to be set
7:03 PM
and the keyboard works completely differently
Avatar
So if I want to debug real rom images, I could only use user202729's emulator?
7:10 PM
Or you can use mine with steveboi's frontend
7:10 PM
Which has a much nicer user experience
Avatar
Wow, can you give me a link?
Avatar
Not at my pc right now
7:11 PM
I will send when on or you can just search the discord
7:11 PM
A frontend for Fraserbc's u8_emu emulator. Contribute to gamingwithevets/u8-emu-frontend development by creating an account on GitHub.
7:11 PM
There
7:11 PM
Actually not sure if he's updated it yet
7:13 PM
Ah yes he has
Avatar
Wow
7:13 PM
I thought an emulator would be a lot more code than that
7:14 PM
That's only the GUI and keyboard (edited)
7:14 PM
The heavy lifting is done in the submode I wrote
Avatar
No yea I found that but even then I was surprised
Avatar
hummm, Actually i have tried the ncurses version of the emulator, but I still cannot boot the real rom
Avatar
It's because I did a lot of abstraction
Avatar
Avatar
qiufuyu123
hummm, Actually i have tried the ncurses version of the emulator, but I still cannot boot the real rom
Ah yes that doesn't work too well
7:15 PM
It was more meant for me testing
7:15 PM
And a quick demo
7:15 PM
The core is good and that's what the frontend uses
Avatar
so what is the different between real rom and emulator rom?
Avatar
Some SFRs
7:17 PM
And keyboard operation
Avatar
What real roms do we have? (edited)
7:23 PM
83gt and a chinese one isn't it
7:23 PM
I'm probably wrong but that's what I seem to remember
Avatar
Avatar
Lumiobyte
83gt and a chinese one isn't it
No
7:24 PM
I have half of segment 0 of 83 gt plus
7:24 PM
Not full ROM
7:24 PM
And yes 991cnx
Avatar
Oh wait
Avatar
And 570esp
Avatar
yeah
7:24 PM
Did user do both those?
Avatar
I’m considering to build user2027’s emulator with emscripten so that it can run on web page.
7:26 PM
Since it is based on sdl2, i think it is not very difficult
Avatar
real roms we have are fx-570ES+ VerE, fx-82ES+ A, fx-580VN X and fx-991CN X
8:21 PM
fx-82ES+ A and fx-991CN X are chinese models
8:21 PM
fx-580VN X is vietnam
Avatar
qiufuyu is here 👀
Avatar
fx-570ES+ VerE is international
Avatar
Avatar
ArNeKJ
qiufuyu is here 👀
you know him?
Avatar
do you have an account on tieba? @qiufuyu123
Avatar
also am I going crazy or did you join a while ago then leave?
8:23 PM
I swear I recognise that pfp
Avatar
wait you guys know him?
Avatar
I have a feeling I recognise them
8:24 PM
not sure how
8:24 PM
lifeemu seems to recognise them more
8:28 PM
Their username seems to be pinyin so maybe they are on tieba
Avatar
hmm i input the name into google translate, i get "求富裕"
Avatar
I found a github and zhihu account
8:36 PM
no tieba
8:36 PM
but might just be searching wrong, idk
Avatar
Avatar
Delta
if it's trying to decrypt rom.bin when it's not encrypted, it'll just get garbage
happy sheep 9/13/2023 11:11 PM
actually in my web emu, it can run both encrypted and not encrypted roms // !! Check for raw/encrypted ROM if (romData[0] === 0 && romData[1] === 0xf0 && !(romData.length & romData.length - 1)) { this._WriteCodeMemory(0, romData.length, romData) } else { this._LoadHexFile(rom, romData) } (edited)
11:13 PM
it's broken when load real rom because not compatible
11:14 PM
i've contacted satgo1546, the original author of that web emu, he'll make it supports the real rom if possible
Avatar
Avatar
qiufuyu123
i replace CY-239(fx991cnx)'s core.dat (rom file) with fx991cnx's rom.bin in ClassicEmu/models
happy sheep 9/13/2023 11:16 PM
btw the repo takinekotfs/CASIO-fx is completely copied from others, and no more contribution will make in it (edited)
11:18 PM
the source code of web emulator is under my github account now, as a private repo. will public it after i clean the copyrighted roms, allowing people upload their own roms to run, to avoid unnessery trouble from casio
11:22 PM
(since satgo1546's original repo was taken down by casio, don't want to make any risk
Avatar
Avatar
Delta
I found a github and zhihu account
uhm, yes. Here is my github https://github.com/qiufuyu123 , and here is my zhihu https://zhuanlan.zhihu.com/p/618704031 but i dont have tieba
Hi , This is qiufuyu ! qiufuyu123 has 17 repositories available. Follow their code on GitHub.
这个视频实现的效果:显示条纹屏幕,等待用户按下shift,显示一行文字,等待用户再次按下shift,再显示一行文字。 新文章来啦: Qesole:【进阶篇】fx-991cnx计算器:利用ROP漏洞执行任意代码 0. 开始阅读前,你需…
👍 3
Avatar
Cool!
12:20 PM
Thank you for the tutorials btw, I understand how ROP works on ClassWiz I after reading your tutorials
12:21 PM
Also, it's not arbitrary code execution because you cannot really run arbitrary code, despite you can call/jump to any position in ROM
Avatar
so uh can you translate it to english?
Avatar
The Google translate is really good on that
12:30 PM
I read a little bit and it was fine
Avatar
Avatar
Steveyboi
so uh can you translate it to english?
So many text💀
12:59 PM
Also I think the whole ROP thing is originated in casiocalc forum so it's probably already in English
Avatar
well you said rop on classwiz
1:02 PM
doing ROP on classwiz is different from doing rop on ES+
Avatar
Yes but it's also from casiocalc
Avatar
😮 1
👍 1
7:27 PM
guys, successfully load a real rom in web emulator
7:27 PM
this web emulator is based on user’
7:27 PM
i rebuild it with emscripten
7:29 PM
but there is still several rendering problems, but i gues i can fix it soon
Avatar
nice
7:38 PM
also have you seen happysheep's emu yet
Avatar
happy sheep 9/14/2023 7:38 PM
he seen it
Avatar
Avatar
Steveyboi
also have you seen happysheep's emu yet
I’ve checked that, since that emu cannot run real rom, i create another one
Avatar
you can just modify the wasm to support real roms
Avatar
haha funny
7:41 PM
good meme
Avatar
...what
Avatar
from the last time I looked at it, it was heavily obfuscated
Avatar
what meme
Avatar
you're not going to be able to modify the WASM
Avatar
douglas!
Avatar
what idk where that gif came from
Avatar
it crowd
7:45 PM
sorry that guy is denholm
7:45 PM
not douglas (edited)
Avatar
Avatar
Delta
you're not going to be able to modify the WASM
wabt...?
Avatar
the WASM is very heavily obfuscated
7:48 PM
so unless you want to spend a few days reverse engineering it
7:48 PM
then you're not going to be able to modify it
Avatar
get it! (Running pretty slow)
Avatar
also you should try to modify the emulator a bit
8:03 PM
its a bit slow and inaccurate
8:04 PM
for example 100+50an on fx-580VN X real rom doesn't work
8:04 PM
100an does tho
Avatar
RapidZapper 9/15/2023 6:12 AM
hey @happy sheep is there any way to access your repo? I was working on my own mod but since it seem your is already quite complete, better to provide my contribution here i guess
Avatar
happy sheep 9/15/2023 6:59 AM
tell me your GitHub username, i add you to collaborator
7:02 AM
probably I'll make it public soon
Avatar
guys, i create a internal hex editor in user's emulator
👍 1
8:25 PM
maybe make user's emu debug easier xD
Avatar
uhhh
8:34 PM
users emu
8:34 PM
its bad
8:34 PM
some ppl hate it
Avatar
why?
8:35 PM
but its only one to run real rom
Avatar
well we do have other emulators that can run real rom
8:37 PM
just modify them a bit to support classwiz
8:37 PM
also if you're gonna mod users emu make sure to remove this code if (!handler) PANIC("unrecognized instruction %04X at %06zX\n", impl_opcode, (((size_t)reg_csr.raw) << 16) | (reg_pc.raw - 2));
8:38 PM
this is not what happens on real hardware
8:38 PM
real CPU does not hang when illegal instruction is hit
Avatar
iknow
8:38 PM
actually i wanna user' to debug the real rom
Avatar
Well Delta's emulator might be a better choice
8:39 PM
It doesn't work yet, but it's written in C so better performance
8:40 PM
and probably easier to modify
Avatar
Avatar
qiufuyu123
actually i wanna user' to debug the real rom
just keep in mind users emu is not updated in the last 3 years, doesn't support CWII and is not 100% accurate
Avatar
do we have any ClassWiz emulators except user's emulator that aren't JS and WebAssembly (not web but C++ and meant to run as a desktop app) (edited)
Avatar
not yet
Avatar
Avatar
wolf
do we have any ClassWiz emulators except user's emulator that aren't JS and WebAssembly (not web but C++ and meant to run as a desktop app) (edited)
c++? nah
9:28 PM
c? 👍
9:29 PM
you will need to make your own frontend for it (delta's emu) to make it support classwiz
9:32 PM
if you cannot do that (because you aren't a programmer) then idk
Avatar
Avatar
Steveyboi
c? 👍
is there a github link
Avatar
Contribute to Fraserbc/u8_emu development by creating an account on GitHub.
Avatar
(No SWI yet because am lazy)
9:48 PM
I'll add that and interrupts at somepoint
9:48 PM
When?
9:48 PM
Stop asking questions
Avatar
sorry but i need to ask question
10:34 PM
i wanna add "cheats" to the frontend now
10:35 PM
basically freeze an address's value
Avatar
That is doable
10:54 PM
You can create callback functions for memory regions
Avatar
i better remake my frontend in C
2:43 PM
python is so slow
Avatar
actually problem is
2:58 PM
i have very little knowledge about C
Avatar
Let's freaking GO
Avatar
yooo
2:59 PM
how did you fix
Avatar
Thanks @Steveyboi and @Delta for all the feedbacks
Avatar
Avatar
Steveyboi
how did you fix
I fixed all the stuffs that you told me that's wrong
3:00 PM
check the github repo
Avatar
Note that the master branch is the one that has all the fixes
Avatar
i fixed lot more stuff...
3:01 PM
or you just fix it all in one commit?
Avatar
Yeah maybe you can open a pull request and I will check it later
Avatar
nah
3:02 PM
i discarded all the commit
3:02 PM
time to start over
Avatar
Sadge :(
Avatar
jk
3:04 PM
i still have the local branch
Avatar
I'd like to know how you fixed the stuffs
3:04 PM
Did you get your fork to show the blinking cursor?
Avatar
no
3:06 PM
well I don't have a front end that has working keyboard so
Avatar
frick dangit i pressed alt+f4 on discord tab
3:07 PM
anyways time to look at the code again
Avatar
I still haven't added hooking functionality yet
Avatar
you should add the ability to freeze a memory address
3:10 PM
"cheats"
Avatar
That goes into memory hooks (edited)
3:10 PM
Like every time the core fetches from memory, a subroutine/function will be called
3:10 PM
you can modify the value that it reads
3:11 PM
and you can also hook writing function, so you can force the core to not write to an address
Avatar
oh also have you fixed the cycle counts
Avatar
No, because I haven't read the latest revision of U8 core instruction manual
3:12 PM
Cycle count doesn't matter yet because my emulator can't even run at 1/10 of real core speed 💀
Avatar
real time stack trace + disassembler
6:38 PM
with imgui
Avatar
remove the shadow
6:39 PM
also make the window resizable by default
Avatar
already make it resizable
Avatar
also rename disassembler window to debugger
6:42 PM
and add register display to it
Avatar
Avatar
qiufuyu123
real time stack trace + disassembler
Nice debugger!
6:42 PM
Did you write the disassembler btw
Avatar
nah
6:43 PM
it looks like its the ancient disassembler
6:43 PM
which nobody should even use in 2023
Avatar
actually the old disassembler is good
Avatar
Well as long as it gets the job done it's nice
Avatar
Avatar
qiufuyu123
actually the old disassembler is good
more like decent
Avatar
I was using my disassembler that runs on a 39gII before Delta made one 💀
Avatar
it treats DSR prefix instructions as a seperate instruction
6:44 PM
which is wrong
Avatar
Not really "wrong"
Avatar
also i don't really like its syntax
Avatar
Ah, preference problem, okay
Avatar
thats just personal taste
Avatar
I implement them as seperate instructions anyway :p
Avatar
like delta said
6:46 PM
for emulators yes that's okay
6:46 PM
for disassemblers, no
6:46 PM
the prefix and the instruction after the prefix are all one instruction
Avatar
Actually no
6:47 PM
OKI said "the assembler forbids long DSR prefix instructions"
6:48 PM
It's probably not a hardware restriction
Avatar
@qiufuyu123
6:49 PM
can you upload the mod to github?
6:49 PM
i wanna mess around with it
Avatar
of course, but maybe later, after i implement breakpoint function
Avatar
I love imgui (edited)
6:56 PM
It looks so nice
Avatar
well i guess if i'm gonna make an emulator frontend in C i might as well use that
Avatar
Avatar
qiufuyu123
real time stack trace + disassembler
This looks so nice
7:23 PM
I love the ui
Avatar
happy sheep 9/16/2023 7:49 PM
https://github.com/CalcWorld/Web-Calc-Emulator it's public now and open source under AGPLv3 license
Contribute to CalcWorld/Web-Calc-Emulator development by creating an account on GitHub.
❤️ 1
Avatar
yayy
Avatar
breakpoint finished (demo) (edited)
👍 2
9:00 PM
Avatar
Awesome!
Avatar
nice
Avatar
An emulator for nX-U8 based Casio calculators. Contribute to qiufuyu123/CasioEmuX development by creating an account on GitHub.
👍 1
9:09 PM
interesting
9:09 PM
you forked my fork
Avatar
also
This repository will get updated with new models in the models folder.
Avatar
Ah, that's the CPP emulator, not the Lua one
Avatar
nah i was too lazy
Avatar
Avatar
ArNeKJ
Ah, that's the CPP emulator, not the Lua one
that emulator uses both c++ and lua
Avatar
Oh nvm then
Avatar
Avatar
Steveyboi
that emulator uses both c++ and lua
i'm consider replace lua scripts with python
Avatar
yesss
Avatar
Yeah sure go ahead
9:12 PM
(mainly because I can't read Lua)
Avatar
i'm gonna inject tkinter code into users emu
9:12 PM
it will be sooo great =)))
9:12 PM
who cares about speed right
9:13 PM
(not that speed)
Avatar
so, i just experimented with replacing the fxESPLUS_Px.dll with one from another ES PLUS emulator
9:45 PM
the result is that the interface gets changed
9:45 PM
but the ROM doesn't
9:45 PM
which means the emulator ROM must be stored in EXE
9:46 PM
(this is not a big discovery, you can just dump the decrypted ROM from memory...)
Avatar
Avatar
Steveyboi
which means the emulator ROM must be stored in EXE
Use ida
10:24 PM
You'll see it
10:24 PM
It is stored as codememwrite calls
💀 1
10:25 PM
It's horrific (edited)
Avatar
Downloading w64devkit because it looks like it can compile my emulator to 64-bit executable, and I want to test if it boosts the performance
Avatar
...and it breaks my emulator due to me abusing undefined behaviors
Avatar
i need something that can speed up my python frontend
11:38 AM
C is too high-level for me
Avatar
Nope, it still takes 10 seconds to power down
11:39 AM
mumbles my code is so bad
11:40 AM
But well, at least it would be better for debugging
11:40 AM
since I can use GDB now
11:40 AM
I never used GDB, actually
Avatar
Avatar
ArNeKJ
Nope, it still takes 10 seconds to power down
my frontend is slow but it... flashes the casio logo and boots right back up
Avatar
HOLY [REDACTED] why is there so many commands
Avatar
complexity of command line debuggers
Avatar
No no no my brain is not designed for that thanks
11:45 AM
types q
Avatar
@Steveyboi I fixed SB/RB Dbitadr, now it sets the status bar properly
3:12 PM
also the flags are fixed
Avatar
got it
3:16 PM
will test later
3:16 PM
i'm at school now
3:20 PM
Avatar
Tried out my emulator using @Steveyboi's frontend and it draws MathIO stuffs properly :O
3:57 PM
(but calculations still return ERROR...) (edited)
Avatar
It does storing properly but it cannot do any calculation
4:21 PM
I did 3.141592653589793->B
Avatar
GammaVelorum 9/18/2023 4:28 PM
lets say if i had a program that could take the machine hex code and interpret and run it lets say i also have the rom of a certain calculator is that all i need to make a working emulator?
Avatar
oh also @ArNeKJ you should change the submodule to your repo
Avatar
Avatar
GammaVelorum
lets say if i had a program that could take the machine hex code and interpret and run it lets say i also have the rom of a certain calculator is that all i need to make a working emulator?
errr....yeah maybe
Avatar
GammaVelorum 9/18/2023 4:29 PM
wait really
Avatar
of course, without accurate emulation things won't behave right
Avatar
Avatar
Steveyboi
oh also @ArNeKJ you should change the submodule to your repo
I compiled the libraries manually :p (edited)
Avatar
Avatar
Steveyboi
of course, without accurate emulation things won't behave right
GammaVelorum 9/18/2023 4:32 PM
wdym "accurate emulation"?
Avatar
Now any calculation return either ERROR or random errors (e returns Insufficient MEM lol); The index on the left of TABLE mode output is always 0
Avatar
Avatar
GammaVelorum
wdym "accurate emulation"?
The behaviors of instructions
Avatar
GammaVelorum 9/18/2023 4:32 PM
im probably making an emulator at the end of the year
Avatar
It's not hard to follow the instruction manual, but it's hard to make zero mistake when writing it
4:33 PM
and debugging it is hard AF
Avatar
GammaVelorum 9/18/2023 4:33 PM
seems like a good thingy to train my practically non existent rust skills
Avatar
Avatar
ArNeKJ
It's not hard to follow the instruction manual, but it's hard to make zero mistake when writing it
GammaVelorum 9/18/2023 4:33 PM
alright gonna see how hard this is gonna get
4:33 PM
i assume quite hard
Avatar
It's not hard, really
Avatar
Random question
4:50 PM
Would it be theoretically possible to write an emulator in python
4:50 PM
I know it is a bad idea and I will not be attempting
4:50 PM
But it should be possible no?
Avatar
Yes it's possible
Avatar
GammaVelorum 9/18/2023 4:50 PM
yes it is
4:51 PM
and it isnt really a bad idea
Avatar
I mean it would just be slow
Avatar
GammaVelorum 9/18/2023 4:51 PM
just that i have no guarantee that its gonna be fast
Avatar
Yeah
Avatar
Avatar
Lumiobyte
I mean it would just be slow
GammaVelorum 9/18/2023 4:51 PM
wont be too slow i imagine
Avatar
It's just a bad idea cuz of performance
Avatar
GammaVelorum 9/18/2023 4:51 PM
writing one in js might be a good idea (edited)
Avatar
I'm just gonna try do mine in c down the line
4:52 PM
Cuz I want to run it on an MCU anyway
4:52 PM
But I guess if I did it in python I could use micropython
4:52 PM
💀
Avatar
My emulator is already slow lol
Avatar
Yeah and yours is in C
Avatar
yes because my C code is bad
Avatar
Which is why I think a python one would be so slow that it's not worth even trying
Avatar
Avatar
ArNeKJ
yes because my C code is bad
GammaVelorum 9/18/2023 4:53 PM
really?
4:53 PM
Yeah
Avatar
GammaVelorum 9/18/2023 4:53 PM
wait do you have a repo
Avatar
Avatar
Lumiobyte
Which is why I think a python one would be so slow that it's not worth even trying
Bacteria's code is in Java
Avatar
Avatar
GammaVelorum
wait do you have a repo
GammaVelorum 9/18/2023 4:53 PM
oh wait of course you do
Avatar
Avatar
GammaVelorum
wait do you have a repo
Avatar
Avatar
ArNeKJ
Bacteria's code is in Java
That's still not as abstracted as python tho
4:53 PM
I know some java and thought about doing it in that
4:53 PM
But I want to learn a lower level language regardless
Avatar
Well, imagine me porting my emulator to a 15MHz Z80 one day
4:54 PM
lol
Avatar
Would be cool
Avatar
(I want to make one for TI-84 Plus)
Avatar
I just wanna see custom calculators with mods
4:54 PM
If we can't reprogram the calcs themselves
4:54 PM
Next best thing is making our own calc with the roms
Avatar
to do that you will need to first make a custom PCB, remove the old PCB from a calculator (not easy on classwiz) and put the PCB in and flash the custom ROM
5:00 PM
also someone can like make an emulator frontend in C based on my pythom frontend
5:00 PM
then i will fork it and make my own modifications
5:01 PM
i'm not good at C so i cannot DIY ok
Avatar
I didn't make my own frontend is because I don't know how to do GUI in C
5:01 PM
and that would make my code platform-dependent
Avatar
yeah me too
Avatar
Currently, my code only relies on standard libraries, and it compiles without any error with -std=c99
Avatar
Avatar
Steveyboi
to do that you will need to first make a custom PCB, remove the old PCB from a calculator (not easy on classwiz) and put the PCB in and flash the custom ROM
I mean I could just run it on a nodemcu and use an AliExpress screen
5:02 PM
But yes
Avatar
python already has some GUI libraries i know, and i'm already familiar with it
Avatar
I would love to make a custom PCB
5:02 PM
That's long term goals
Avatar
oh also
5:03 PM
you have to pay
Avatar
Pay what
Avatar
I'm pretty sure you can run an U8 emulator at reasonable speed on a STM32 MCU (edited)
Avatar
I don't care if it's not lightning fast
Avatar
Avatar
Lumiobyte
Pay what
for the cost of making the PCB ofc
Avatar
That's fine lol
5:03 PM
It's a few dollars
Avatar
Have you heard of the magical JLC PCB 👀
Avatar
Shouldn't break the bank
Avatar
Avatar
ArNeKJ
Have you heard of the magical JLC PCB 👀
Exactly they probably even have a free trial offer that could be used lol
Avatar
yeah only a few bucks for some validation samples (edited)
Avatar
so how do i make my frontend faster without switching languages
Avatar
What are you even using
5:05 PM
I've only ever touched pygame
5:05 PM
And I was below average at making it go fast
Avatar
Avatar
Lumiobyte
What are you even using
tkinter combined with pygame
5:06 PM
the GUI stuff is tkinter
Avatar
Would removing the disassembler make it faster? (edited)
Avatar
interface and screen is pygame
Avatar
Avatar
ArNeKJ
Would removing the disassembler make it faster? (edited)
idk
5:06 PM
you can check
Avatar
Also how did you implement the memory display & keyboard?
5:06 PM
By polling the bytes?
Avatar
Avatar
ArNeKJ
Also how did you implement the memory display & keyboard?
for keyboard its tkinter events, i got some help from delta
Avatar
No I mean how do you put the keyboard status into memory?
Avatar
just memory write
5:08 PM
for the memory display i just call the memory read function every time it updates
5:09 PM
and since the size passed to the core can only be 1, 2, 4 or 8 multiple calls need to be made to get all the bytes needed
Avatar
on real hardware the calculator ROM writes to KI & reads KO..?
Avatar
it doesn't write to KI
Avatar
but it does write to KO
Avatar
Oh I remembered it wrong
5:13 PM
but how do you know what value should be written to KI?
5:13 PM
You poll KO right 👀
Avatar
uhh yeah ig
5:14 PM
also you must set F014H correctly
5:14 PM
when a key is pressed its set to 2
Avatar
My plan is to monitor writes to KO, when it's updated I will update KI according to key(s) pressed
Avatar
normally F014H is set to 0x20 every half a second to wake the CPU from stop mode
5:24 PM
when bit 1 of F014H is set the calc will check for keys pressed
5:29 PM
the keyboard will never work if F014H is not set correctly
Avatar
interesting
Avatar
@Steveyboi I have 2 questions about your frontend: 1) How to step through the code while single-step mode is activated? I tried s, [enter] and [space] but none of them works; 2)The jump to function doesn't work, as it returns: File "main.py", line 296, in set_csr_pc self.sim.sim.core.regs.csr = int(csr_entry, 16) if csr_entry else 0 (...) AttributeError: function 'core' not found
Avatar
which frontend?
6:41 PM
my core or your core
Avatar
His frontend for my emulator
6:43 PM
I haven't implemented keyboard so I am using his frontend for debugging
6:43 PM
but I don't know how to step through the piece of code that potentially has problems
6:44 PM
code seems to be gone
Avatar
Avatar
ArNeKJ
@Steveyboi I have 2 questions about your frontend: 1) How to step through the code while single-step mode is activated? I tried s, [enter] and [space] but none of them works; 2)The jump to function doesn't work, as it returns: File "main.py", line 296, in set_csr_pc self.sim.sim.core.regs.csr = int(csr_entry, 16) if csr_entry else 0 (...) AttributeError: function 'core' not found
also you'll need to change that to your core's registers
6:45 PM
that's correct for my core
6:45 PM
the sim.sim.core.regs.csr
Avatar
Hm is it case-sensitive? I've never tried calling C code from Python myself
Avatar
add self.bind('<Return>', lambda x: self.set_step()) to the __init__ of Sim
6:46 PM
that will make it step on [Enter]
Avatar
Thanks, I will try to modify it
6:54 PM
self.root.bind('<Return>', lambda x: self.set_step()) does the job for me
6:54 PM
Thank you Delta ❤️
Avatar
Well PC and CSR are static variables in my emulator
6:58 PM
I don't know how to edit that
Avatar
wait what?
6:59 PM
how are they static
Avatar
I mean global
6:59 PM
uhhh
Avatar
oh no I see
Avatar
I declared them as global variables, they are statically allocated
Avatar
I've never actually used static like that
Avatar
Avatar
ArNeKJ
I declared them as global variables, they are statically allocated
huh
7:00 PM
I have no idea how you access that
7:00 PM
have you tried just setting it?
Avatar
I don't know how to
7:01 PM
Like I said, I never tried running C code from Python
7:01 PM
I am searching on the Internet for a solution right now
Avatar
how does steveboi's code read it?
Avatar
def get_var(self, var, typ): return typ.in_dll(self.sim, var)
Avatar
uhhhhhh
7:03 PM
maybe try self.get_var('PC', ctypes.c_uint16).value = XXXX idk (edited)
7:05 PM
yeah that should work
Avatar
self.sim.get_var('PC', ctypes.c_uint16).value = XXXX works
7:07 PM
Thank you Delta^2
Avatar
no problem
Avatar
i bound the step function to the backslash key
8:21 PM
i didn't bind it to return because that's already binded to the equals key on the keyboard
Avatar
Avatar
Steveyboi
i bound the step function to the backslash key
I can't find that code anywhere
Avatar
hmm
8:22 PM
i'm walking home from school now
Avatar
I agree it used to be there
8:23 PM
but it might have been removed by accident
Avatar
ah
8:23 PM
its in run
8:23 PM
...no?
8:24 PM
i looked on the GH repo
8:24 PM
the code is there (edited)
Avatar
god dangit
9:04 PM
the simu8 emulator is so flawed
9:05 PM
it can't even do multi-statements
9:05 PM
i tried to do AnsCopy and it doesn't work
Avatar
Avatar
Steveyboi
and since the size passed to the core can only be 1, 2, 4 or 8 multiple calls need to be made to get all the bytes needed
You can get the pointer (void* DataMemory) and read a block of memory from there
Avatar
ah ok, updated
Avatar
Have you fixed the problem about jumping?
Avatar
oh
9:41 PM
lemme fix it now
9:41 PM
i forgot to update the code there
Avatar
Avatar
Steveyboi
it can't even do multi-statements
Well I didn't say it's working
9:42 PM
It does draw the MathIO symbols properly
Avatar
there
Avatar
All the calculations return errors or throws errors
Avatar
jumping fixed
Avatar
a single sqrt returns ERROR
Avatar
it does detect syntax errors properly tho
9:44 PM
what
Avatar
One of the dispatcher is wrong
Avatar
okay looks like nope
Avatar
I don't know where the bug is
9:45 PM
It's late and I'm tired so... Off to sleep!
Avatar
so cursed
9:47 PM
very cursed in fact, i like it
9:47 PM
in lineio syntax errors are fine
Avatar
Avatar
ArNeKJ
Now any calculation return either ERROR or random errors (e returns Insufficient MEM lol); The index on the left of TABLE mode output is always 0
^
9:49 PM
It renders properly so I guess input routine is fine
9:49 PM
But calculations are not okay
Avatar
since the calculations keep returning ERROR
9:49 PM
i just thought of a very smart idea
9:49 PM
change the ERROR string
9:49 PM
in rom of course
Avatar
How would that make a difference?
Avatar
nah just messing around
Avatar
🤦‍♂️
Avatar
sorry can't help myself
9:51 PM
boom
9:51 PM
1+1=3
Avatar
Change it to "Yes."
9:54 PM
It drawing MathIO symbols
Avatar
oh god
Avatar
GammaVelorum 9/19/2023 9:10 AM
is everything little endian?
9:11 AM
so like the leftmost bit is the least and the rightmost is the greatest?
Avatar
not everything
9:12 AM
most
9:12 AM
the screen is not little endian
Avatar
GammaVelorum 9/19/2023 9:13 AM
wdym the screen isnt little endian
9:13 AM
how does the screen work
Avatar
the screen data is converted to bits
9:14 AM
its all big endian
Avatar
GammaVelorum 9/19/2023 9:14 AM
hows the screen data converted to bits
Avatar
the bits are read from top to bottom left to right
Avatar
GammaVelorum 9/19/2023 9:14 AM
oh
9:14 AM
like reading a book?
Avatar
yeah ig
Avatar
GammaVelorum 9/19/2023 9:14 AM
then what about the status bar?
Avatar
wait no
9:14 AM
left to right top to bottom
9:15 AM
yeah like reading book
Avatar
Avatar
GammaVelorum
then what about the status bar?
same
9:15 AM
but instead of a line
Avatar
GammaVelorum 9/19/2023 9:15 AM
so the status bar bits come first?
Avatar
yes
9:16 AM
2 bytes make up a word big endian means the left byte is the high byte and the right is the low byte little endian is the opposite
Avatar
Avatar
Steveyboi
the screen is not little endian
It doesn't matter because VRAM is uint8_t[]
Avatar
Avatar
Steveyboi
but instead of a line
GammaVelorum 9/19/2023 9:25 AM
go on
Avatar
specific bits are checked which control the status indicators
9:30 AM
other bits are ignored
Avatar
now i wanna make a frontend in C
10:59 AM
what GUIs should i use
10:59 AM
or some1 can make the GUI stuff
Avatar
ncurses
Avatar
not command line GUI...
11:00 AM
Just use C++ lol
4:33 PM
Looks nice and is easy
Avatar
Yes imgui looks nice, but it's for C++ so :(
Avatar
Write C bindings then
5:58 PM
It's just a simple wrapper
6:01 PM
Oh wait cimgui exists
6:01 PM
Someone's already done ig
Avatar
dependencies aaa
Avatar
Um, can we do multi-threading in C?
6:18 PM
Oh well that would probably be platform-specific
6:22 PM
reads ImGui readme This thing is so freaking complicated
Avatar
GammaVelorum 9/19/2023 6:22 PM
wait how do the classpad web emulators work
6:22 PM
wasm?
Avatar
Avatar
ArNeKJ
Um, can we do multi-threading in C?
Yes
Avatar
Avatar
ArNeKJ
Oh well that would probably be platform-specific
It is not
6:25 PM
Pthreads is cross platform iirc
Avatar
This is becoming too complicated for me
Avatar
I wouldn't worry about it tbh
6:26 PM
I don't plan on doing threading
Avatar
I'm not doing threading now
6:27 PM
I never did one, actually
6:27 PM
but I feel that it could be helpful
Avatar
someone can use imgui to make a frontend
6:37 PM
but not me
6:37 PM
i am noob at C(++)
6:39 PM
maybe delta and qiufuyu can do it but not me (edited)
Avatar
My brain is boiling inside my skull
Avatar
I have little time today
Avatar
This is way more complicated than "Just include the source code in your project"
Avatar
Maybe in a bit
6:40 PM
I need to shave among other things
6:41 PM
I look like unwashed hobo
Avatar
lol
Avatar
I need to take the actual rendering backend into consideration- I mean the author already wrote the code to drive them but AAAA
Avatar
lifeemu has a problem, he keeps losing his sanity
Avatar
I hate GUI things
6:43 PM
GUIs look nice but the code/data used to define/describe them are usually a mess
6:45 PM
Building Unfortunately nowadays it is still tedious to create and maintain portable build files using external libraries (the kind we're using here to create a window and render 3D triangles) without relying on third party software and build systems. For most examples here we choose to provide: - Makefiles for Linux/OSX - Batch files for Visual Studio 2008+ - A .sln project file for Visual Studio 2012+
I NEED TO GET A FRICKING VISUAL STUDIO TO BUILD IT????
Avatar
And this is why I hate C/C++ on windows
6:47 PM
Package management is painful
6:47 PM
Everything is just shit (edited)
Avatar
But the fact is that many people use Windows
6:51 PM
I have no idea how any of these works
6:51 PM
Modern computer/software system is too complicated for me
6:52 PM
Leave me alone with my TI-84 Plus >:( (edited)
6:53 PM
And yes I probably need to build with Visual Studio in order to use DirectX
6:54 PM
flips the table
6:55 PM
Okay lemme take a look at SDL
Avatar
I think a WASM emulator with good debug tools would be nice
7:12 PM
Something similar to x64dbg
7:12 PM
Also then we could store ROMs in a git repo
7:12 PM
Along with function annotations
7:12 PM
Make reverse engineering a collaborative effort
Avatar
happysheep's emulator?
Avatar
Can it do debugging stuff?
7:13 PM
Like watchpoints and breakpoints
Avatar
oh um
7:13 PM
uhhhhh no?
Avatar
It's not too hard to build stuff for WASM
7:14 PM
Someone already built user's emu
7:15 PM
But something that's easier to debug would be nice
7:15 PM
And as I said, collaborative labels would be cool
7:15 PM
I might make some kind of function signature thing
7:15 PM
So we can automate finding and labelling functions (edited)
Avatar
CEmu include file
7:18 PM
(CEmu allows you to load include files, and it will replace immediates with labels/constants)
Avatar
Pretty much yes
Avatar
So we can just host include files for models in a GitHub repository or somewhere (edited)
7:19 PM
and let the disassembler to load it
7:20 PM
something like os.mode := 080F9h so it replaces all 80F9hs to os.mode
7:38 PM
Code and data labels
7:38 PM
With data labels we could even have a command entry thing
7:38 PM
Where you could do something like os.mode = 0xC1
7:38 PM
Could even have autocomplete
Avatar
Avatar
ArNeKJ
Modern computer/software system is too complicated for me
GammaVelorum 9/19/2023 7:50 PM
ah yes, return to monke
7:50 PM
if possible im gonna see if i can make a web based emulator with wasm since rust can compile to that
7:52 PM
i know some ui thingies like pygame and love2d but no way im gonna write an emulator in python or lua (edited)
Avatar
i tried to make one
8:22 PM
An nX-U8 core emulator in Python. Contribute to gamingwithevets/pyu8 development by creating an account on GitHub.
8:23 PM
don't expect it to work boys
8:23 PM
it sucks af
Avatar
The code looks familiar 👀
Avatar
I threw another hour into looking at SDL but...
Avatar
GammaVelorum 9/19/2023 8:53 PM
so are we looking for suitable frontends now
Avatar
The fact is that I have ideas about making one, but I don't know how to implement one
Avatar
uhhh idk
8:54 PM
GUI on C is so hard 😫
8:55 PM
also i need to update my python disassembler
8:55 PM
the score system can't beat anding
Avatar
It's not that hard, but I hate the configurations I have to do
Avatar
Avatar
Steveyboi
also i need to update my python disassembler
nah actually i think its good enough
8:57 PM
lol
Avatar
Avatar
ArNeKJ
The code looks familiar 👀
it does
8:58 PM
i just reimplemented your instruction implementation
Avatar
Look how easy it is to code for ImGui! but the configurations is 😫
8:59 PM
WHY EVERYTHING USES CMAKE
Avatar
make > cmake
9:00 PM
why tf do ppl even use cmake
Avatar
I don't even use make lol
Avatar
there should really be only 1 build system
Avatar
I never learned it
Avatar
make
Avatar
It's not shipped with mingw32 so 🤷‍♂️
Avatar
can't you install it...?
Avatar
That's also why I chose to make my emulator as independent as possible
Avatar
Avatar
Steveyboi
can't you install it...?
I've grabbed w64devkit and it has make but it didn't help when I tried to install SDL2
9:02 PM
I ran make native as the tutorial suggested but it errors so
Avatar
Avatar
Steveyboi
why tf do ppl even use cmake
For larger projects it does have some nicities
9:05 PM
But the config is a bit hard yes
9:05 PM
I have one makefile I use between all projects
9:05 PM
Works quite well
Avatar
now back to programming language hell
9:07 PM
and the good and bad U8 emulators
Avatar
The good, the bad and the ugly
Avatar
Well I guess I will take a look at ImGui later
9:12 PM
As long as I can simply drag-n-drop SDL2.dll into the directory to make it work, it'll be fine
Avatar
or delta can do all the hard work =))) (edited)
Avatar
I don't want to do all the renderer configurations, not even a little bit of it
9:13 PM
Well then is it really "my" emulator?
Avatar
nah by hard work i was talking about the GUI
9:15 PM
but good luck if you wanna DIY
Avatar
I think I'mma try the webapp thing I was talking about
Avatar
My emulator is too slow to be useful lol
Avatar
A single-header ANSI C immediate mode cross-platform GUI library - GitHub - Immediate-Mode-UI/Nuklear: A single-header ANSI C immediate mode cross-platform GUI library
Avatar
woah its... decent (edited)
Avatar
I'm actually learning C++ now 🤡
10:10 AM
There's one feature I like about OOP: I can use class methods like str.length()
Avatar
i wished python was fast
Avatar
Java:public class Box { private int size; public void Box(size) { this.size = size; } }
10:59 AM
But C++ (as far as I know):class Box { int size; public: void Box(size) { this.size = size; } }
11:00 AM
Ok nice less bloated
11:01 AM
But what the heck is with all the obscure syntaxes like reinterpret_cast<type>(value) while I can just do (type)value in C
Avatar
try C# now, you will definitely have an even better time learning it =))
11:03 AM
It's MicroSoft's flavor of Java(as far as I know) disguised as C variant (edited)
11:03 AM
also I hate platform-specific things
Avatar
Avatar
Steveyboi
i wished python was fast
GammaVelorum 9/20/2023 12:03 PM
mojo
Avatar
well i am not an AI developer
12:03 PM
so no
12:05 PM
programming languages i prefer + popular programming languages crossed out languages are ones idk 1. python 2. C 3. C++ 4. java 5. mojo 6. golang 7. brainfu- oh wait
Avatar
GammaVelorum 9/20/2023 2:56 PM
well javascript is quite fast
2:56 PM
lua is slower but luajit is also fast
2:56 PM
but lua lacks a lot of features because its main goal was to be small
Avatar
Avatar
GammaVelorum
well javascript is quite fast
i want offline, i hate online
Avatar
GammaVelorum 9/20/2023 3:41 PM
you cant run js offline?
Avatar
when i think of javascript i think online
Avatar
It can run offline
4:29 PM
It runs in your browser
Avatar
now we return back to programming language speeds, GUIs and sanity
Avatar
GammaVelorum 9/20/2023 5:25 PM
describe your ideal programming language
Avatar
python
5:26 PM
don't have time to describe
5:26 PM
i have cram school now
Avatar
Avatar
Steveyboi
now we return back to programming language speeds, GUIs and sanity
^^
Avatar
I hate C++
10:45 PM
Why I need to explicitly inherit constructor of parent classes in subclass constructor
Avatar
Avatar
ArNeKJ
I hate C++
The Administrator 9/21/2023 7:13 AM
imo c++ is to complex and convoluted just go back to c or use a less convoluted language like java 1.3-1.6 besides my emulator that uses java does not even use inheritance for anything other than the gui the actual cpu emulation code could probably be translated to c without having to change too much my cpu emulation code does not use inheritance so therefore it could probably be translated to use structs Example of how my emulator code could be translated: public void parseInstruction(int o) --> void parseInstruction(Processor *p, int o)
Avatar
python is best language, but its slow af
Avatar
GammaVelorum 9/21/2023 3:48 PM
what are coprocessor registers?
3:49 PM
CRn, CERn, CXRn, CQRn?
Avatar
I guess it's that you can read different types of data from other microcontrollers
3:50 PM
Probably another controller that uses U8 core
3:51 PM
(but you can totally fool the microcontroller that it's talking to another U8 core but it's actually ARM or something)
Avatar
now i wonder what happens if a coprocessor instruction is run but theres no coprocessor
5:47 PM
i guess nothing happens?
Avatar
has anyone found the error-handling code in an ES PLUS emu rom may be useful in finding why ac break appears
Avatar
Log every function call yourself and try to find the one call that happens when an error is about to appear
7:12 PM
IIRC it's 0323C
7:15 PM
7:15 PM
Oh well it's 0352C on real 570+
7:16 PM
It's not error handler, but it displays the error screen
Avatar
ah AC Break is the first error ID
7:19 PM
that explains why its AC Break specifically instead of other errors
Avatar
messing around again
8:57 PM
(if you are wondering, i just hooked the error function and set R0 to 0D when the function is jumped to)
8:58 PM
invalid errors! this is error 0F
8:59 PM
oh god theres a death threat in there
8:59 PM
eh i think its fine
9:01 PM
error 69
9:05 PM
error 2B. glitch string pointers sure are weird (because they are)
9:07 PM
looks like there is a string pointer table at 0:0902H
9:08 PM
well technically it starts at 0:0900H
9:10 PM
unfortunately not much interesting things here, as 0:0958H just contains more string data
9:11 PM
ok thats enough fun for now
9:11 PM
time to find this error function in fx-83GT+ emu rom
9:12 PM
found it: f_0320E
Avatar
ok so after some debugging i traced back the error to f_0BE86
9:24 PM
(in fx-83GT+ emu rom)
9:25 PM
looks like 00:80FCH stores error codes?
9:27 PM
okay this is a bit frustrating here
Avatar
ok i am frustrated now
9:34 PM
someone else can debug instead
9:38 PM
maybe delta? ¯\_(ツ)_/¯ (edited)
Avatar
Me: tries to build Delta's emulator in Cygwin Cygwin: throws errors
10:45 PM
Avatar
Missing ncurses
Avatar
I installed it but still
10:54 PM
Also I tried to compile my emulator in Cygwin and it runs super fast
10:54 PM
I don't know why
10:54 PM
Maybe it's because I removed <conio> functions from the loop
11:01 PM
I'll try running gwetm's frontend from Cygwin and see what happens
Avatar
cmon Cygwin doesn't have package for pygame 2.2.0+ and pip doesn't work
Avatar
pip doesn't install pygame; Windows installation doesn't work in Cygwin; the frontend requires 2.2.0+ or something to run
12:16 AM
I'm tired of this
Avatar
Avatar
ArNeKJ
pip doesn't install pygame; Windows installation doesn't work in Cygwin; the frontend requires 2.2.0+ or something to run
yea the frontend requires pygame 2.2.0 or later, since in previous versions there was no support for embedding a pygame window into tkinter
Avatar
you can try removing the check, however note that two windows will appear on startup (one tkinter, one pygame)
Avatar
removes the check Traceback (most recent call last): File "main.py", line 888, in <module> sim = Sim() File "main.py", line 453, in __init__ self.root = DebounceTk() File "/usr/lib/python3.8/tkinter/__init__.py", line 2270, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable
10:22 AM
(@Steveyboi)
Avatar
uhhh idk
Avatar
Oh this shit
1:01 PM
Pygame and tkinter are not properly interoperable
1:25 PM
I will try to make my simple C frontend to work in Cygwin
1:25 PM
Maybe it will run faster, lol
Avatar
Avatar
Delta
Pygame and tkinter are not properly interoperable
yea i think thats why pygame keyboard events don't work
Avatar
on linux it looks like mouse events don't work too, on windows it works fine
Avatar
I'm looking at ncurses now 💀
Avatar
in the past my brother used a tutorial to make a snake game in curses with python
2:58 PM
windows-curses
3:00 PM
actually i wonder how do you make a real-time display of something on terminal without flashing
3:00 PM
i always just draw one frame, clear screen and start over
3:00 PM
is there any more efficient way? 🤔
Avatar
GammaVelorum 9/23/2023 3:05 PM
clear only the parts that need clearing?
3:05 PM
by using ansi escape codes you can position the terminal cursor anywhere
3:06 PM
depends on what you want to draw
3:06 PM
also you dont really have to clear unless it has to be blank the next frame
Avatar
problem? windows command prompt is not ansi
Avatar
GammaVelorum 9/23/2023 3:06 PM
windows 🤮🤮🤮
Avatar
its windows-1252
Avatar
GammaVelorum 9/23/2023 3:07 PM
wait you cant make it ansi?
Avatar
you can type color iirc
Avatar
GammaVelorum 9/23/2023 3:07 PM
i thought running chcp 65001 > NUL did the trick
Avatar
nah that just sets the code page to utf-8
3:08 PM
useful when you display special characters
3:08 PM
like vietnamese text
Avatar
GammaVelorum 9/23/2023 3:09 PM
i swear that fixed my ansi escape code problems in a batch file i made some time ago
3:09 PM
you just have to copy the actual \x1b character into the batch file
Avatar
copy the actual character?
3:10 PM
that ain't elegant
Avatar
GammaVelorum 9/23/2023 3:10 PM
windows dev aint ever been elegant
Avatar
also idk shet about ansi
Avatar
GammaVelorum 9/23/2023 3:11 PM
ANSI Escape Codes. GitHub Gist: instantly share code, notes, and snippets.
Avatar
I'm flattening ALU function calls, hope it helps the performance
3:49 PM
Also I'm gonna move coreDispRegs out of the emulator core since it's not contributing to the functionality and creates unnecessary dependence on I/O functions
Avatar
ok so i added partial classwiz support in my frontend (for delta's emu)
5:52 PM
however they don't work
5:53 PM
and yes (i think) i set up all the regions correctly
5:54 PM
ohhh i think i know why
5:54 PM
stupid me
5:54 PM
i forgot to disable CSR mod 2 for classwiz
5:55 PM
there we go!
5:55 PM
i haven't set up the screen properly yet so all i see is this
5:57 PM
stuff appears to work
5:57 PM
but it's... slow af
5:58 PM
how does the screen work on CWI?
5:59 PM
can someone tell me?
6:00 PM
also i need to know which bits control the status bar indicators
6:00 PM
the wiki has no mention of it
6:03 PM
yea i can see it works, this is the buffer display
6:04 PM
checksum calculation takes super long
6:05 PM
serial number screen, this is also buffer display
Avatar
GammaVelorum 9/23/2023 6:06 PM
well i thought cwi had more pixels than esplus
Avatar
lemme also disable the screen range for CWI
Avatar
Avatar
GammaVelorum
well i thought cwi had more pixels than esplus
yes
6:06 PM
it does
Avatar
GammaVelorum 9/23/2023 6:06 PM
but i havent heard anything about ex screen sry
Avatar
its just that i haven't actually implemented the CWI screen properly yet
Avatar
GammaVelorum 9/23/2023 6:06 PM
didnt hear anything before joining this server
6:07 PM
meanwhile i was thinking if i should design my own frontend and not make it look like a casio calc
6:07 PM
could make buttons easier to control and position
Avatar
neat, after disabling screen range i can see the cursor properly now
Avatar
GammaVelorum 9/23/2023 6:07 PM
i'll try to keep the colours but the shapes will be gone
Avatar
noooo
6:08 PM
mode menu, you can make out the icons
Avatar
Avatar
Steveyboi
neat, after disabling screen range i can see the cursor properly now
GammaVelorum 9/23/2023 6:09 PM
is your cursor huge only because your pixels are huge?
Avatar
yes
Avatar
GammaVelorum 9/23/2023 6:09 PM
seems like every second line is blank too
Avatar
because it's ES PLUS screen
6:09 PM
i haven't implemented a proper CWI screen yet
6:10 PM
this is just a placeholder
Avatar
GammaVelorum 9/23/2023 6:10 PM
so ex and esplus roms can run off the same emulator?
Avatar
no
6:10 PM
the memory regions are different
6:10 PM
you have to configure them for each model type
Avatar
GammaVelorum 9/23/2023 6:10 PM
what memory regions
Avatar
ROM window, RAM...
6:11 PM
for example in ES PLUS the ROM window is first 0x8000 bytes of segment 0 code (edited)
6:12 PM
in CWI it's first 0xD000 bytes
6:12 PM
i just looked at the frontend again (i left it on)
6:13 PM
and somehow it jumped to segment 15 code
Avatar
Avatar
Steveyboi
in CWI it's first 0xD000 bytes
GammaVelorum 9/23/2023 6:13 PM
ok will keep that in mind when i start work on an emulator
Avatar
also RAM is 0xD000 - 0xEFFF on CWI
Avatar
GammaVelorum 9/23/2023 6:14 PM
gonna focus on making a program that takes the bytes and converts them into instructions them i will make an emulator around it
Avatar
you mean you gonna make a disassembler and make an emulator using it
Avatar
GammaVelorum 9/23/2023 6:14 PM
yes
Avatar
diagnostic press AC screen
Avatar
GammaVelorum 9/23/2023 6:15 PM
D I A G N O S T I
6:15 PM
is the blank line every 2 lines also a visual bug
Avatar
yes
6:16 PM
i guess CWI takes up 32 bytes for one line
Avatar
GammaVelorum 9/23/2023 6:16 PM
how big is the cwi screen?
Avatar
192 * 63
6:16 PM
idk if that's counting the status bar
6:17 PM
probably it doesn't
6:17 PM
the height is 63
Avatar
Yes 192x63 without status bar
Avatar
precision test screen
6:19 PM
192 / 8 = 24
6:19 PM
and indeed 24 bytes are used on this screen
6:20 PM
6:21 PM
after calculating it looks like screen data is from F800H to FFFFH
6:21 PM
with 24 bytes being used for each line
Avatar
Splitting ALU functions didn't increase the performance 💀
Avatar
bruhh
Avatar
Avatar
ArNeKJ
Splitting ALU functions didn't increase the performance 💀
GammaVelorum 9/23/2023 6:47 PM
wait how slow is slow
Avatar
30 secs maybe
Avatar
mine takes 30 seconds to finish checksum
Avatar
for checksum
Avatar
GammaVelorum 9/23/2023 6:47 PM
like whats the measurement of speed, instructions per second?
Avatar
Avatar
ArNeKJ
mine takes 30 seconds to finish checksum
GammaVelorum 9/23/2023 6:48 PM
oh calculators do that in 1 second?
6:48 PM
gg
Avatar
about 2 secs
6:48 PM
pd value check is about 4 i think
6:53 PM
6:53 PM
not quite success
6:53 PM
probably the DSR thingy (edit: no it isn't lol) (edited)
6:54 PM
the status bar isn't implemented correctly yet
6:54 PM
also you can set the pixel size now
6:54 PM
i set it to 1.5, that's why it looks a bit weird
6:59 PM
i go have dinner now
6:59 PM
will be AFK
Avatar
god dangit
7:28 PM
classwiz is so slow (edited)
7:32 PM
now let's test 100+50an
7:32 PM
see if it fcks up like users emu
7:35 PM
NO WAY
7:35 PM
IT ACTUALLY WORKS
7:36 PM
JACKPOT
7:36 PM
no lol jk
7:36 PM
Ran# doesn't do syntax error
7:37 PM
which it should do in 100+50an
Avatar
does anyone have a status bar map of CWI?
7:49 PM
sth like this
Avatar
hey delta can you fix the DSR (edited)
8:19 PM
hmm the checksum uses segment 5
8:19 PM
maybe that's code segment 0?
8:21 PM
yup, mapping data segment 5 to code segment 0 fixed the checksum, nice!
Avatar
I removed stdio.h dependence of core
Avatar
ok
11:30 AM
have you pushed
Avatar
huh
11:31 AM
oh wait
11:31 AM
its my fork
11:31 AM
lemme merge (edited)
11:32 AM
nooo
11:32 AM
no merge
11:32 AM
commits were discarded
11:32 AM
rip
11:33 AM
welp looks like i have to fix the cycle counts once again
Avatar
You can make a pull request about cycle count
Avatar
(not that it does anything useful but i like to do it)
Avatar
also cycle count doesn't matter yet because no timer & it runs way slower than real hardware
Avatar
btw my frontend has its own timer
Avatar
Every time it shuts down, the stack points goes up 4 bytes 🤔
Avatar
somehow users emu managed to emulate the shutdown correctly
11:38 AM
i tested
11:38 AM
the timer still runs
Avatar
And eventually it runs into an illegal instruction with glitched CASIO logo
Avatar
also add an MIT license or sth to the repo
Avatar
I don't know the licenses
Avatar
on the github repo just click add file > create new file, name the file LICENSE, press "choose a license template"...
Avatar
Mmm, GPL seems to be the one for me
11:46 AM
It requires the modified code to be open-source, and the modified code also follows GPL, I think?
Avatar
yes
11:48 AM
nice
11:48 AM
GPL 3 license
Avatar
Thanks for the suggestion
Avatar
calculations still return ERROR....
Avatar
Because that hasn't been fixed yet
11:50 AM
I'm mainly cleaning up the code
11:51 AM
maybe I could make it run in cygwin
Avatar
also the stack pointer is normally 8DA4H
11:51 AM
after a shutdown its 8D9AH
11:51 AM
10 bytes of difference
11:51 AM
not 4
11:52 AM
The register dump when it crashes (edited)
11:53 AM
not very useful, I know
Avatar
now i'm repeatedly shutting down until it crashes
11:53 AM
stack is 8CFAH now
11:53 AM
a long way
Avatar
There is a function in mmu.h that allows you to save the RAM
11:53 AM
core status is not saved though
11:54 AM
maybe I need to isolate that into savestate.h or something
Avatar
great, the casio logo is appearing longer now
11:54 AM
that's a great sign
11:55 AM
Avatar
register dump
Avatar
This is the broken shutdown screen
Avatar
this is so satisfying
11:57 AM
unfortunately due to the corruption, every time it shuts down it waits 0x5A5A ticks on startup
11:58 AM
that's about 5 seconds
11:58 AM
SP looking good now
11:58 AM
but still a long way to go
12:03 PM
almost there
12:04 PM
so slow
12:04 PM
Sorry for slow emulator
12:04 PM
oh maybe you can disable the STOP mode thing for now
12:04 PM
so it goes faster
Avatar
also this appears on screen now
12:04 PM
i cannot type
12:05 PM
looking in memory nothing is even typed
12:05 PM
not even invisible
12:06 PM
WAIT WHAT
12:06 PM
somehow SP jumped back to 8DxxH
Avatar
I'm waiting for performance profile to be done
12:06 PM
it runs so freaking slow (edited)
Avatar
did the calc just- wait no
12:07 PM
ik why (edited)
12:07 PM
i pressed ON
12:08 PM
i'm gonna use a macro now
12:08 PM
will be AFK
Avatar
Avatar
Steveyboi
GPL 3 license
GammaVelorum 9/24/2023 12:27 PM
i heard gplv2 was better than gplv3
Avatar
Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 51.22 0.42 0.42 _mcount_private 23.17 0.61 0.19 7617578 0.00 0.00 coreStep 12.20 0.71 0.10 8628494 0.00 0.00 memoryGetCodeWord 4.88 0.75 0.04 1516594 0.00 0.00 memoryGetData 4.88 0.79 0.04 __fentry__ 1.22 0.80 0.01 6259991 0.00 0.00 memorySetData 1.22 0.81 0.01 1 10.00 10.00 coreReset 1.22 0.82 0.01 _pushValue 0.00 0.82 0.00 1 0.00 0.00 memoryInit
12:29 PM
What is _mcount_private
Avatar
Avatar
GammaVelorum
i heard gplv2 was better than gplv3
rly
12:29 PM
i don't think so
Avatar
Avatar
ArNeKJ
Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 51.22 0.42 0.42 _mcount_private 23.17 0.61 0.19 7617578 0.00 0.00 coreStep 12.20 0.71 0.10 8628494 0.00 0.00 memoryGetCodeWord 4.88 0.75 0.04 1516594 0.00 0.00 memoryGetData 4.88 0.79 0.04 __fentry__ 1.22 0.80 0.01 6259991 0.00 0.00 memorySetData 1.22 0.81 0.01 1 10.00 10.00 coreReset 1.22 0.82 0.01 _pushValue 0.00 0.82 0.00 1 0.00 0.00 memoryInit
I am profiling a c++ chess program with gprof, and it seems that the the function that uses most of the time is called "_mcount_private". A Google search only revealed that others also see it on top of their profiles, nothing about the nature of the function. I assume that it is an internal gpp...
Avatar
oh lol
12:30 PM
okay then
Avatar
Avatar
Steveyboi
rly
GammaVelorum 9/24/2023 12:30 PM
i swear i read somewhere people hated gplv3
Avatar
yeah i think i have heard about the hate
12:31 PM
gpl3 has stricter copyleft protections than gpl2
Avatar
looks like memoryGetCodeWord is slow
Avatar
ALMOST THERE
12:46 PM
boom
12:46 PM
the arrow isn't there anymore
Avatar
Why it takes so long???
12:47 PM
It's so compact (edited)
Avatar
idk
12:48 PM
!!!!
12:48 PM
it instantly started up again
12:48 PM
despite SP at 89xxH
12:48 PM
great sign
Avatar
% cumulative self self total time seconds seconds calls ns/call ns/call name 67.24 0.39 0.39 _mcount_private 12.07 0.46 0.07 8628494 8.11 8.11 memoryGetCodeWord 10.34 0.52 0.06 7617578 7.88 21.71 coreStep 3.45 0.54 0.02 3564123 5.61 5.61 memorySetData 3.45 0.56 0.02 1516594 13.19 13.19 memoryGetData 3.45 0.58 0.02 __fentry__ 0.00 0.58 0.00 1 0.00 16.23 coreReset 0.00 0.58 0.00 1 0.00 0.00 memoryFree 0.00 0.58 0.00 1 0.00 0.00 memoryInit Ok this time it's faster with -Os
Avatar
and several shutdowns later i see this
12:49 PM
next shutdown
Avatar
memoryGetData takes freaking 13.19ns per call, slower than coreStep wtf
Avatar
bruhh
12:50 PM
next shutdown
12:50 PM
screen buffer
Avatar
Avatar
Steveyboi
next shutdown
That looks like the thing when you do 16x[AC][left][=] on 100x sqrt(
Avatar
yeah
12:50 PM
i saw that effect
12:51 PM
the screen slowly gets glitchier
12:51 PM
and FINALLY
Avatar
nice (edited)
Avatar
something interesting
12:52 PM
entire RAM + SFRs are trashed now
12:52 PM
filled with 5A
12:53 PM
screen buffer, the LCD is turned off due to screen mode SFR (F031H) being corrupted
12:55 PM
the emulator is stuck in memset
12:55 PM
which makes sense
12:56 PM
SP is literally near the point where it overflows into the ROM window
12:56 PM
and since the bytes remaining is stored in the stack
12:56 PM
and ROM window is read only
12:57 PM
the calc will write 5A to the entire data segment 0
12:58 PM
pressing ON fixes everything
12:59 PM
so i was gonna mention this before
1:00 PM
but i'm on my main PC which has a 1440p screen
1:00 PM
so now i can have this huge window
1:01 PM
and it is slow af
1:01 PM
btw this is delta's emu
Avatar
it ends up taking 30 seconds to just calculate the checksum
Avatar
oh hey delta can you fix the DSR later? (edited)
Avatar
What is issue?
Avatar
DSR is not set
2:05 PM
when DSR prefix is used
Avatar
I modified the memory&LCD setup of my emulator and it seems to run initialization without an issue
2:22 PM
(I made it run the ROM of real 991CN X) (edited)
Avatar
i will port the CWI code of delta's emu's frontend to the simu8 frontend later
Avatar
uh well it doesn't run well because CASIO decided to map code seg0 to data seg 5
Avatar
thankfully i already mapped everything so my frontend is good
2:26 PM
but emu keyboard doesn't work yet
2:26 PM
only real keyboard
Avatar
you cannot do custom map on my emulator though
Avatar
that ain't good...
2:27 PM
it looks like emu keyboard on CWI is 3 bytes at 04:8E00H
2:28 PM
but it doesn't work
2:28 PM
for now i am using CY-000 VerA rom to test the emu keyboard
Avatar
I might change the MMU code someday
Avatar
aaaaaaa it doesn't fcking work
Avatar
(to support arbitrary code seg->data seg mapping)
Avatar
users emu test time
2:32 PM
2:32 PM
why does it not work on my frontend
2:33 PM
i've committed the code
2:33 PM
A frontend for Fraserbc's u8_emu emulator. Contribute to gamingwithevets/u8-emu-frontend development by creating an account on GitHub.
Avatar
ooohh wait
2:48 PM
i know why
2:48 PM
i've been using fx-580VN X real rom the whole time
2:48 PM
frick
2:49 PM
dumbest mistake ever
Avatar
ok now it works
2:56 PM
yay
Avatar
Haha poo
3:12 PM
Laugh at the funny
3:12 PM
3:13 PM
My MMU code is a mess
Avatar
interesting, in fx-991CN X real ROM it calculates the Pd value thingy
4:02 PM
....wait what.
Avatar
when i try to do the fx-580VN X hard brick on delta's emu, the entire segment 0 gets filled with 1B
4:32 PM
and then it jumps execution to segment 11
4:33 PM
i think on real hw, unmapped segments contain FF (edited)
4:33 PM
which translates to BRK instructions
4:35 PM
maybe the hard brick is due to that
4:35 PM
continuous BRK instructions
4:35 PM
and BRK is kind of like an interrupt
4:35 PM
so it blocks the ON button interrupt
4:36 PM
therefore you can't reboot the calc
4:36 PM
this is just my guess
4:36 PM
i may be wrong
4:37 PM
also, fx-580VN X with solar power
Avatar
Avatar
Steveyboi
i may be wrong
Well it runs to the end of BRK slide at some point
Avatar
no it won't
4:40 PM
it's stuck in an unmapped segment
4:40 PM
which contains all FFs
Avatar
Avatar
ArNeKJ
Click to see attachment 🖼️
################
5:37 PM
That ASCII screen must take up your entire monitor lmao
Avatar
yeah ig
5:38 PM
and that's why GUI is better than terminal, go figure
Avatar
More that trying to represent a GUI using a terminal is scuffed
Avatar
almost done
Avatar
Avatar
Lumiobyte
That ASCII screen must take up your entire monitor lmao
GammaVelorum 9/24/2023 5:39 PM
delta was pretty smart to use braille
Avatar
Avatar
GammaVelorum
delta was pretty smart to use braille
Yeah I saw that it was really clever
Avatar
but the text is still too big
5:40 PM
(a bit)
5:40 PM
but it's alright
Avatar
GammaVelorum 9/24/2023 5:40 PM
wait does rendering the pixels for gui frontends take up a lot of time? (edited)
Avatar
uhhh idk
Avatar
GammaVelorum 9/24/2023 5:40 PM
like it could be a bottleneck
Avatar
oh my frontends are multi-threaded
5:41 PM
one thread is the core
Avatar
GammaVelorum 9/24/2023 5:41 PM
i think it should be fine if you draw all the pixels at once but idk
Avatar
the other handles the peripherals
5:41 PM
actually the keyboard is the only peripheral that's in the core thread
5:41 PM
and the timer
5:41 PM
and breakpoints
5:42 PM
god what is this
5:42 PM
i compiled my frontend (u8_emu_frontend) with nuitka
5:42 PM
and it is still 30K IPS
5:42 PM
with fx-580VN X real ROM
5:42 PM
this is unacceptable
Avatar
Avatar
GammaVelorum
i think it should be fine if you draw all the pixels at once but idk
You still have to evaluate the entire framebuffer 1 by 1 and check if a pixel is on or off though
5:43 PM
Then you can either render each pixel 1x1
5:43 PM
Or try and calculate it into a shape and render it like that?
5:43 PM
I doubt it would save much time
Avatar
Avatar
Lumiobyte
Or try and calculate it into a shape and render it like that?
GammaVelorum 9/24/2023 5:43 PM
ya thats what i was thinking
Avatar
the pixel size can be configured in my frontend btw
Avatar
I actually thought about it last time optimising the front end came up and personally I came to the conclusion that it would be very difficult and very pointless
5:43 PM
But idk
Avatar
GammaVelorum 9/24/2023 5:44 PM
but its not every frame that you have to draw pixels right
Avatar
yeah
5:44 PM
seperate threads
Avatar
You can also only draw updates yeah
Avatar
GammaVelorum 9/24/2023 5:44 PM
only when the bits controlling the lcd change
Avatar
no
5:44 PM
i draw it on every frame
Avatar
GammaVelorum 9/24/2023 5:45 PM
you have to draw it every frame im talking about updating it
Avatar
But I assume he is just clearing the pygame canvas and redrawing pixels
Avatar
but the core and screen are on seperate threads
Avatar
Avatar
Lumiobyte
But I assume he is just clearing the pygame canvas and redrawing pixels
yup exactly
Avatar
Steveyboi do you even know where the bottleneck in your frontend is?
5:45 PM
Because I doubt it's the pygame
5:45 PM
And if it was the pygame
5:45 PM
It would be the images
5:45 PM
Not the rects
5:45 PM
Because rects are fast
Avatar
Avatar
Lumiobyte
Steveyboi do you even know where the bottleneck in your frontend is?
no.....
Avatar
GammaVelorum 9/24/2023 5:47 PM
i thought in pygame you could save stuff to canvases
Avatar
also i just looked back at my frontend and it is executing from segment 15 for some reason
Avatar
GammaVelorum 9/24/2023 5:47 PM
just render the image once to the canvas, copy it every time the display updates, draw in the new display and put it onto the screen?
Avatar
the issue with the IPS cannot be the screen
5:48 PM
since it's on a seperate thread
5:49 PM
it is most likely the keyboard
5:49 PM
since it's on the core thread
5:52 PM
so how can i optimize the keyboard
Avatar
GammaVelorum 9/24/2023 5:54 PM
how does your keyboard work currently
Avatar
this is in __init__ def press_cb(event): for k, v in config.keymap.items(): p = v[0] if (event.type == tk.EventType.ButtonPress and event.x in range(p[0], p[0]+p[2]) and event.y in range(p[1], p[1]+p[3])) \ or (event.type == tk.EventType.KeyPress and event.keysym.lower() in v[1:]): if k is None: self.reset_core(False) elif config.real_hardware: self.keys_pressed.add(k) else: self.write_dmem(0x8e01, 1, 1 << k[0], self.emu_kb_seg) self.write_dmem(0x8e02, 1, 1 << k[1], self.emu_kb_seg) def release_cb(event): if config.real_hardware: for k, v in config.keymap.items(): if event.type == tk.EventType.KeyRelease and event.keysym.lower() in v[1:] and k is not None and k in self.keys_pressed: self.keys_pressed.remove(k) elif event.type == tk.EventType.ButtonRelease: self.keys_pressed.clear() else: self.write_dmem(0x8e01, 1, 0, self.emu_kb_seg) self.write_dmem(0x8e02, 1, 0, self.emu_kb_seg) embed_pygame.bind('<KeyPress>', press_cb) embed_pygame.bind('<KeyRelease>', release_cb) embed_pygame.bind('<ButtonPress-1>', press_cb) embed_pygame.bind('<ButtonRelease-1>', release_cb)
5:55 PM
it's delta's code
5:55 PM
i just rewrite it a bit
5:55 PM
so it supports keyboard
Avatar
GammaVelorum 9/24/2023 5:55 PM
care to summarize what it does?
5:55 PM
im horrible at reading code written by others
Avatar
bruh
Avatar
Avatar
GammaVelorum
im horrible at reading code written by others
GammaVelorum 9/24/2023 5:56 PM
especially if its in libraries i never touched
Avatar
so press_cb checks the event type to see if its a keyboard press or mouse click if its a mouse click, it checks if the X and Y positions are in the correct ranges if its a keyboard press, it checks if the keysym is correct, i convert the keysym to lowercase so uppercase and lowercase will both work then it checks if we're running in real ROM mode or emulator ROM mode if its real, it adds the key we pressed to a set that keeps track of what keys are held down if its emulator it writes to the emulator keyboard immediately (since you cannot hold keys on emulator)
6:02 PM
it's very simplified
6:04 PM
also there is this code def keyboard(self): if config.real_hardware: ki = 0xff ko = self.read_dmem(0xf046, 1)[0] for ki_val, ko_val in self.keys_pressed: if ko & (1 << ko_val): ki &= ~(1 << ki_val) self.write_dmem(0xf040, 1, ki) if len(self.keys_pressed) > 0: self.write_dmem(0xf014, 1, 2) else: ready = self.read_dmem(0x8e00, 1, self.emu_kb_seg)[0] if not self.last_ready and ready: self.write_dmem(0x8e01, 1, 0, self.emu_kb_seg) self.write_dmem(0x8e02, 1, 0, self.emu_kb_seg) self.last_ready = ready
6:04 PM
it handles the keyboard pressing for real roms
Avatar
Avatar
Steveyboi
so press_cb checks the event type to see if its a keyboard press or mouse click if its a mouse click, it checks if the X and Y positions are in the correct ranges if its a keyboard press, it checks if the keysym is correct, i convert the keysym to lowercase so uppercase and lowercase will both work then it checks if we're running in real ROM mode or emulator ROM mode if its real, it adds the key we pressed to a set that keeps track of what keys are held down if its emulator it writes to the emulator keyboard immediately (since you cannot hold keys on emulator)
GammaVelorum 9/24/2023 6:04 PM
does it run every frame?
Avatar
no
Avatar
GammaVelorum 9/24/2023 6:04 PM
only runs when somethings pressed?
Avatar
yup
6:05 PM
but the keyboard function does run every frame
Avatar
GammaVelorum 9/24/2023 6:05 PM
cant say im an expert on this though
6:05 PM
does it slow down if you spam inputs?
6:05 PM
if it doesnt maybe keyboard isnt the bottleneck
6:06 PM
try to have the program profiled
Avatar
i can't even spam
6:06 PM
it's too slow to even spam
6:07 PM
bruh offline
6:08 PM
well someone can test my frontend
6:08 PM
the code is on github
Avatar
Avatar
Lumiobyte
That ASCII screen must take up your entire monitor lmao
Indeed
Avatar
Avatar
Steveyboi
and that's why GUI is better than terminal, go figure
Sure but I don't know how to make GUI
6:09 PM
I am looking for ncurses and ImGui but not yet
Avatar
Avatar
Lumiobyte
That ASCII screen must take up your entire monitor lmao
my CWI window takes up my entire 1440p screen
6:11 PM
doesn't even fit on my 1080p screen on my lenevo ideapad
6:15 PM
so what should i do with my core thread now?
6:15 PM
too slow
6:17 PM
Maybe learn C this time lol
Avatar
noooooooooooooooooooooooooo
Avatar
someone can make a GUI template in C or sth
Avatar
read: someone can make a GUI frontend in C
Avatar
me: reads C++
Avatar
Because ImGui
Avatar
C + C++
6:28 PM
its possible right?
Avatar
C++ is a super set of C so yeah C code can compile with C++ compiler
Avatar
no like #include <stdio.h> #include <iostream>
6:29 PM
that is just example
6:29 PM
both in one script
Avatar
Well this exists: extern C { } (edited)
Avatar
so now what should i do to make my frontend faster without switching languages
6:57 PM
?
Avatar
GammaVelorum 9/24/2023 8:18 PM
profile it
8:19 PM
figure out whats taking it so long
Avatar
dunno how
Avatar
GammaVelorum 9/24/2023 8:19 PM
its in python right?
8:19 PM
i think cprofile is builtin
8:19 PM
but third party ones are probably better (not that i ever used them)
8:20 PM
you just set up the profiler somewhere in your code then give it a function call to start profiling and another for it to stop
8:20 PM
and it tells you whats taking so long
Avatar
huh
8:29 PM
8:29 PM
idk what to do with this
Avatar
GammaVelorum 9/24/2023 8:31 PM
what did you time with it
Avatar
the with cProfile.Profile() as pr thing
Avatar
GammaVelorum 9/24/2023 8:32 PM
which function did you use cprofile for
Avatar
core step
Avatar
GammaVelorum 9/24/2023 8:32 PM
if its only one step its unlikely to get anything
8:33 PM
dont really know how to use cprofile either
8:33 PM
see if theres any other useful libraries out there
Avatar
hmmm...wth is cumtime
8:35 PM
hmm 309259 0.273 0.000 1.363 0.000 main.py:782(read_dmem)
8:35 PM
the 1.363 is the cumtime
8:38 PM
ok so i changed my read_dmem implementation def read_dmem(self, addr, num_bytes, segment = 0): data = b'' bytes_grabbed = 0 if num_bytes > 8: while bytes_grabbed < num_bytes: remaining = num_bytes - bytes_grabbed if remaining >= 8: grab = 8 else: grab = remaining dt = self.sim.read_mem_data(segment, addr + bytes_grabbed, grab) data += dt.to_bytes(grab, 'little') bytes_grabbed += grab return data else: return self.sim.read_mem_data(segment, addr, num_bytes).to_bytes(num_bytes, 'little')
8:38 PM
it's still so slow
8:39 PM
maybe that's just because i let it run for 3 secs before stopping
8:40 PM
here i let it run for 1 second 106442 0.071 0.000 0.490 0.000 main.py:782(read_dmem) 42952 0.017 0.000 0.240 0.000 main.py:799(write_dmem) (edited)
8:41 PM
yeah that's slow
8:41 PM
reading a byte from data memory on every frame...
8:42 PM
actually its multiple bytes
8:42 PM
5 data memory reads in one step
8:44 PM
no actually i counted wrong
8:45 PM
3 read calls, 6 bytes read total 5-6 bytes written
8:45 PM
that's quite a lot
8:52 PM
ok so i made the timer write 2 bytes at once instead of 1 byte at a time
8:52 PM
lookin much better 115562 0.401 0.000 0.457 0.000 main.py:219(read_mem_data) 23301 0.069 0.000 0.080 0.000 main.py:225(write_mem_data) 115562 0.080 0.000 0.554 0.000 main.py:781(read_dmem) 23301 0.010 0.000 0.091 0.000 main.py:798(write_dmem)
8:53 PM
not quite so with reading tho
8:54 PM
i think i will have to simplify read_dmem
8:54 PM
make it return an integer instead of bytes object
Avatar
so i rewrote a lot of stuff
9:04 PM
but it's still slow....???? 136752 0.434 0.000 0.497 0.000 main.py:219(read_mem_data) 27539 0.096 0.000 0.108 0.000 main.py:225(write_mem_data) 136752 0.046 0.000 0.544 0.000 main.py:781(read_dmem) 27539 0.011 0.000 0.120 0.000 main.py:783(write_dmem)
Avatar
replace the screen read_dmem calls with access directly to self.core.sfr
Avatar
yeah just thought about that
Avatar
could also do the same thing with the memory viewer
Avatar
already did
9:13 PM
i removed all calls to read_dmem in the core thread 48715 0.145 0.000 0.168 0.000 main.py:219(read_mem_data) 49650 0.148 0.000 0.172 0.000 main.py:225(write_mem_data) 48715 0.019 0.000 0.187 0.000 main.py:781(read_dmem) 49650 0.019 0.000 0.191 0.000 main.py:783(write_dmem)
9:13 PM
lookin good
9:13 PM
woah
9:13 PM
40K IPS
9:13 PM
cursor is flashing like crazy
Avatar
yeah it does that
9:15 PM
if I have time I'll try and speed up the core
Avatar
still takes 1 minute to calculate checksum and Pd thing tho (edited)
Avatar
also there
9:19 PM
rebuild it
9:19 PM
did the DSR thing (edited)
Avatar
great
9:28 PM
everythings a bit faster now
9:28 PM
especially on CWI
9:29 PM
however still slow
Avatar
great, 1an/111111111111Ans^1 (fx-580VN X real) doesn't crash
9:43 PM
like on users emu
Avatar
woooooh (edited)
9:44 PM
already better 💪
9:44 PM
I will fight user
Avatar
but it doesn't have the exact same effect as on real hardware tho
Avatar
still winning
Avatar
unfortunately 111111(1(1)r on fx-570ES+ VerE real still doesn't work, users emu also crashes
9:46 PM
if you can get it working exactly like on real hw then i will be amaze
Avatar
ah the joys of windows
9:50 PM
cls
9:50 PM
shit
Avatar
yes
9:50 PM
dual screen (edited)
Avatar
Avatar
Steveyboi
unfortunately 111111(1(1)r on fx-570ES+ VerE real still doesn't work, users emu also crashes
hmmmm
9:50 PM
I think that'll either be code being interpreted as data
9:51 PM
or a memory mapping issu
9:51 PM
what peripherals are we missing?
Avatar
idk
9:54 PM
also hard brick on fx-82ES+ A also doesn't work, just like users emu
9:54 PM
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
9:55 PM
after the first calculation with r
9:55 PM
the calc should go back to COMP mode
9:55 PM
not stay in stat submode 0
9:55 PM
both users emu and this emu stays
9:55 PM
also when writing this the casio logo flashed
9:55 PM
thats neat
9:59 PM
so after step 2 it should be COMP?
9:59 PM
what's not getting done then...
10:00 PM
something is either not getting written
10:00 PM
or being overwritten when [ON] is pushed
Avatar
The Administrator 9/25/2023 9:26 AM
has anyone tried adding support for the fx-82solar ii (emulator rom) my emulator can boot the rom but i have yet to implement support for 7-segment displays so it is mostly unusable
Avatar
i can test stuff on the official emulator to figure out which bits correspond to which segments/indicators
9:31 AM
also the emulator usually crashes for no reason
9:32 AM
aaaa it keeps crashing
9:34 AM
i used strace to debug what's going on, and here's where the emulator crashes --- Process 9952, exception 4000001f at 0000000075b09b87 --- Process 9952 thread 9992 exited with status 0xc0000409 --- Process 9952 thread 2984 exited with status 0xc0000409 --- Process 9952 thread 2968 exited with status 0xc0000409 --- Process 9952 thread 7552 exited with status 0xc0000409 --- Process 9952 thread 15624 exited with status 0xc0000409 --- Process 9952 thread 4648 exited with status 0xc0000409 --- Process 9952 exited with status 0xc0000409
9:34 AM
process 9952 is the emulator i think
9:37 AM
i have no idea wth is going on here
9:37 AM
full log
9:38 AM
it crashes when i try to look at screen memory in cheat engine
9:38 AM
so frustrating
9:40 AM
ok looks like F811H controls the SHIFT and MODE indicators
9:40 AM
looks like SHIFT is F811H.6, and MODE is F811H.2
9:41 AM
F813H.2 is M
9:43 AM
huh looks like F814H and F815H control the DEG - RAD - GRA indicators
9:45 AM
ah it crashed again
9:46 AM
Indicator F814H F815H DEG 00000100 00000011 RAD 00000000 01000011 GRA 00000000 00000111
9:46 AM
after some debugging
9:48 AM
wait
9:48 AM
why do i have to go to diagnostic
9:48 AM
when i can just extract the indicators from the EXE itself (edited)
9:49 AM
9:49 AM
there
9:49 AM
all the indicators
9:49 AM
also did i just find...the long lost "Sample" graphic?!
9:50 AM
all the vietnameses should remember this
9:50 AM
there's the "Sample" text at the bottom
9:51 AM
and we just found the original graphic
9:54 AM
also here's a HQ mode reference graphic from the EXE
9:55 AM
also if anyone wants it, here's the sample graphic with its raw resolution
9:56 AM
i have yet to find the segments
Avatar
The Administrator 9/25/2023 10:02 AM
Avatar
woah nice
Avatar
omg
10:26 AM
fx-580VN X on u8-emu-frontend on my main PC
10:26 AM
60K IPS
10:26 AM
however still slow
Avatar
woah
11:46 AM
fx-83GT+ emu rom
11:46 AM
~80K IPS
Avatar
so currently with fx-580VN X, the mode menu takes 2 seconds to draw
11:55 AM
thats... slow
Avatar
GammaVelorum 9/25/2023 1:31 PM
why are the official emulators so much faster than ours?
Avatar
idk
2:30 PM
i think i asked that question before
Avatar
The Administrator 9/26/2023 7:21 AM
common emulator mistake is mixing up pointer and the value at the pointer if your emulator has a bug, this type of mistake could be the culprit here is an example of this type of mistake: the value of r9 is 0x07 mov r8, r9 is supposed to set r8 to 0x07 with the mistake, it will instead set r8 to 0x09 (pointer instead of value) another related mistake can cause r8 to be set to the value of r7 (value instead of pointer) (edited)
⬆️ 1
Avatar
i once experimented with changing LEA [ERm] to set EA to the word value of the address in ERm in life's emu, that caused some problems
7:26 AM
the correct implementation of LEA [ERm] is to set EA to the value of ERm
Avatar
WIP
Avatar
ok so
9:30 AM
images was a bad idea
9:30 AM
i think i will just use rects
Avatar
WIP
Avatar
WIP
Avatar
some other emulator mistakes (probably does not affect anything but if you're aiming for accurate emulation you should fix):
  • pushing and popping R0 pushes a word onto the stack, with the low byte being the value of R0 and the high byte being an indeterminate value. some emus may push and pop a single byte instead which is wrong
  • the memory model may look like its not important but it is, other than the fact that CSR is not used, the push and pop operations also get affected. refer to page 1-23 in nX-U8 core instruction manual for exactly what stack operations are affected
(edited)
Avatar
I just do large only
9:20 PM
Is there any SMALL models?
Avatar
yes
9:34 PM
fx-82solar ii
9:36 PM
i checked with users casio fx-570VN+ emulator cheat table in cheat engine
9:36 PM
memory model address is set to 0
9:36 PM
which is small
Avatar
Refactorying my MMU functions again to add arbitrary segment mapping
Avatar
U8 instruction manual mentions ROM windows could only be "max32K bytes"..?
9:55 AM
But CWI has ROM windows of 0xD000 bytes, and that's over 32KiB
Avatar
Avatar
ArNeKJ
U8 instruction manual mentions ROM windows could only be "max32K bytes"..?
huh? what page mentions it?
Avatar
Search the quoted string in it
10:19 AM
It's in the chart
Avatar
ohh this
10:23 AM
thats certainly weird
Avatar
the manual is old (latest version was issued in 2011) so perhaps lapis managed to make rom window size higher than 0x8000
10:35 AM
the true max rom window size is probably 0xF000 bytes
10:36 AM
since FxxxH are the SFRs
10:37 AM
oh wait
10:37 AM
there would be no space for the stack
10:37 AM
hmm
Avatar
formatting fx-82solar ii screen data correctly is a bit of a pain
9:35 PM
but not too hard
9:38 PM
[[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [2, 4, 1, 0, 4, 1, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]] my emulator has partial support for fx-82solar ii screen now, of course the screen itself is not implemented yet but the screen data is now properly formatted
Avatar
partial screen for fx-82SOLAR II
10:05 PM
i haven't added the decimal dots yet
10:11 PM
10:13 PM
committed and pushed
10:13 PM
note that the engineering notation is not implemented yet
10:14 PM
only the big numbers
Avatar
Adding hooks on top of my code will be a huge pain
Avatar
indeed
11:38 PM
lots of things are hard coded
Avatar
and I just realized that I probably should extract the reading/saving functionality out of core
Avatar
yeah
11:39 PM
true
Avatar
because core states cannot be saved/restored yet and memory states cannot be loaded
11:39 PM
...Which means I need to pack all the stuffs into structs
Avatar
Avatar
ArNeKJ
because core states cannot be saved/restored yet and memory states cannot be loaded
in theory i can implement save states in my frontend
Avatar
...It begins to smell like C++
11:46 PM
I took a look at Delta's implementation, and I think switching to C++ might be a viable option
Avatar
C structs are nothing like C++
11:47 PM
It only gets there when you start implementing virtual function tables lol
Avatar
My emulator is bloated already and I don't think I can port it to my poor little TI-84 Plus
11:48 PM
So I might just make this thing even more bloated lol
Avatar
Avatar
ArNeKJ
and I just realized that I probably should extract the reading/saving functionality out of core
but if I do that then I need to rewrite the whole MMU code again^2 🤦‍♂️ (edited)
Avatar
screen fully implemented now
11:57 AM
also funnily enough the main function in fx-82solar ii emu rom comes right after the startup code
12:02 PM
ok so diagnostic in fx-82solar ii emu rom is at 8172H
12:04 PM
also, diagnostic in fx-82solar ii emu rom
12:04 PM
and this is the same screen in delta's emu (my frontend) (edited)
12:07 PM
image 1: my frontend image 2: the official emulator
12:07 PM
hmm
12:08 PM
so official emulator has pd value set to 2
12:14 PM
end of diagnostic
12:14 PM
"G00b"?
Avatar
GammaVelorum 9/28/2023 12:56 PM
goob 👍
12:56 PM
is that actually intended or a emulator bug
Avatar
idk
2:31 PM
that is how it displays
2:31 PM
the screen is correct
2:32 PM
idk if its intentional or not
Avatar
also the minus signs aren't implemented yet
3:30 PM
(specifically the leftmost one, both small and big)
Avatar
i just added negative signs
Avatar
RapidZapper 9/29/2023 12:50 AM
Casio is releasing windows simulator for new Classwiz EY (edited)
Avatar
RapidZapper 9/29/2023 1:01 AM
First being EY006
Avatar
checking my version list, EY006 is fx-92 Collège
6:35 AM
do you have proof?
Avatar
hey @ArNeKJ in your emu do you have 8E00H - EFFFH set as read-only?
10:17 PM
actually i found the answer
10:17 PM
no
10:17 PM
good :))))
Avatar
Avatar
Steveyboi
hey @ArNeKJ in your emu do you have 8E00H - EFFFH set as read-only?
no
10:23 PM
I am trying to find why it doesn't run CNX selftest anymore
10:23 PM
Somewhere an out-of-bound read happened
Avatar
did you have to change the regions in the code to get CWI roms working?
10:24 PM
like is there an ES+/CWI flag
Avatar
I haven't implemented it yet
Avatar
or region configuration, like delta's emu
10:25 PM
You can only control which code page maps to which data page, and all pages above data segment 0 are read-only
10:26 PM
My emulator is not that configurable because it's meant to be ported to a calculator and I don't want it to take up like 1MiB of FLASH on calculator
10:26 PM
(I can only map 32KiB of data to CPU address space on that calculator at any given time 💀) (edited)
Avatar
i updated the simu8 frontend
10:32 PM
haven't checked the region functions yet
10:32 PM
unfortunately i am forced to sleep early
10:33 PM
so i go now
Avatar
oh also, on CWI you need to make segment 4 editable
6:33 AM
according to user, segment 4 is used for QR code generation
6:33 AM
and it is also used for the emu kb
6:36 AM
nooooooooooooooooo
6:37 AM
WHAT
6:38 AM
well not everything that should cause a syntax error... not cause a syntax error
Avatar
Avatar
Steveyboi
according to user, segment 4 is used for QR code generation
wat
9:41 AM
For some reason this page have 24 posts, while all of the previous pages have only 20 posts. ((( Classwiz calculator series ))) Nothing interesting here yet. The ROM window is 0D000 bytes (from 0000 to 0CFFF), the ROM is from D000 to EFFF, but some parts may have special purpose (screen buffer? The version have 2 screen buffers, one for Menu selection screen and the other for data edit) or not writable. 0F000 - 0FFFF is still SFR. The emulator does use its segment 4 for QR code generation, so if that is real on real calculator we will have more memory and (potentially) execute code in nX-U8/100 assembly. (without complex ROP construction) Currently fishkiller2 is helping to test something on 991DE X. However because all calculators have different ROM we can't get much data for 991EX.
Avatar
Oh well not for real calculator
Avatar
to know for sure we will need to dump a rom of a CWI calc that has QR code feature
9:50 AM
preferably, fx-991EX or sth
Avatar
Indeed
Avatar
I can't get my emulator to show checksum screen now; Is there anything that I need to set up to make it display?
Avatar
have you mapped all the regions correctly?
Avatar
I don't know
10:28 AM
The checksum function runs without a problem but it doesn't display the result
10:28 AM
It does show the blinking cursor
Avatar
well i don't wanna change the source code just to get CWI working
Avatar
Oh well by jumping to checksum when it's turning off I was able to make it display
10:38 AM
though I don't know why that works
10:39 AM
Avatar
I noticed in gwetm's frontend that when I go to MATRIX mode both MAT and VCT turns on
Avatar
I still haven't found where in the code that caused memory leak on stack
4:22 PM
I thought my add sp, #signed8 was wrong but no
Avatar
GammaVelorum 9/30/2023 5:14 PM
how would an emulator know how to start running the code
5:15 PM
like whats the first instruction it runs
Avatar
Reset vector
5:18 PM
Address unin16 at 0002h in the rom
Avatar
GammaVelorum 9/30/2023 5:19 PM
then it just keeps going down?
5:20 PM
like the instruction counter just increases?
Avatar
yes, until it meets a branching instruction
Avatar
Or interrupt, but it will continue upon reti
6:09 PM
Sorry iret
Avatar
rti
Avatar
Close enough
Avatar
also i haven't mentioned this
7:03 PM
should have mentioned before
7:04 PM
but ES roms are kinda broken
7:04 PM
when you boot the ROM 018 emu rom, you will see a fx-82ES/fx-991ES hybrid
7:05 PM
the kb layout is of the fx-991ES
7:05 PM
but the mode menu is fx-82ES
7:06 PM
looking in diagnostic
Avatar
Because P-
Avatar
where is the pd value on ES then
7:22 PM
F050H as usual?
7:22 PM
i changed it but nothing changed
Avatar
Idk you can check
Avatar
here i set F050H to 3
7:34 PM
oh wait ik
7:34 PM
the value needs to be 3x
7:34 PM
huh, still says P?
7:35 PM
users emu again ig
7:37 PM
dang it users emu doesn't have jump to
7:37 PM
and KI is set in diagnostic
7:38 PM
looks like getting into diagnostic will require ROM modification
7:41 PM
hmm
7:41 PM
Avatar
ah, this looks like the code that calculates the MODE P_ value f_046A6: 0:46A6H 7003 CMP R0, #03H 0:46A8H C107 BLT .l_012 0:46AAH 0109 MOV R1, #09H .l_006: 0:46ACH 11FF ADD R1, #-1H 0:46AEH 8001 ADD R0, R0 0:46B0H C0FD BGE .l_006 0:46B2H C901 BEQ .l_010 0:46B4H 0110 MOV R1, #10H .l_010: 0:46B6H 8010 MOV R0, R1 .l_012: 0:46B8H FE1F RT
Avatar
here, this is a script to calculate ES pd value
683 bytes
Avatar
looks like here are all the valid values 2 0x4 3 0x8 4 0x10 5 0x20 6 0x40 7 0x80
9:03 PM
certainly weird isn't it
9:03 PM
since 0 is not in the list
9:04 PM
here's the code i used: import calc_pd for i in range(0x100): val = calc_pd.calc_pd(i) if val is not None and val < 10: print(val, hex(i))
Avatar
noo way i found it
9:16 PM
MODE P0 corresponds to pd value 1
9:17 PM
MODE P1 is pd value 2
9:24 PM
and FINALLY SUCCESS
9:27 PM
long story short
9:27 PM
pd value shid
Avatar
RapidZapper 9/30/2023 11:53 PM
@Steveyboi yes download available
Avatar
yea saw it
Avatar
Someone help me check my ALU operation inplementation in compiler explorer
Avatar
compiler explorer? never heard of it
Avatar
I want to steal x86 flags
10:37 AM
Well forget about it my code spends most of time on fetching
Avatar
i have seperated ES and ES PLUS in my frontend
10:39 AM
(since the screen buffer address is different lol)
10:39 AM
also i added pd value option
Avatar
I'll be stealing host flags anyway when I port it to Z80
Avatar
interesting, has anyone seen this?
If you change value at [SimU8.dll+16CE88]+EB3B from 80 to FF the screen do something weird when replay. If you change value at [SimU8.dll+16CE88]+EB0D from 70 to 71 (in hex) you can't move cursor. Change it to FF hang the calculator. (these parts are near the one I wrote "memory access when pr to scr (hope code) _ cmd: SimU8engine.CSimU8core::m_Execute+279E" in cheat table) So they are likely to be code.
https://community.casiocalc.org/topic/7583-fx-82-83gt-115-991es-plus-hacking/page-4#entry60723
10:53 AM
oh wait that is code...
10:55 AM
yeah its code, whoops
10:56 AM
[SimU8.dll+16CE88] corresponds to segment 1 code (edited)
Avatar
Ok now I'm gonna try to find out what's going wrong when I change mode
Avatar
@Steveyboi Check this out:
3:16 PM
Turns out that it's a bug in your frontend 💀
Avatar
well i'm not home atm
Avatar
I thought I could find the bug in my emulation code that caused memory leak when turning off
3:17 PM
but no
Avatar
i will get on my computer at about 10:00 PM china time
3:18 PM
since i have cram school today
Avatar
I spent 2 hours in commenting CASIO's code 💀
3:20 PM
Should have checked memory first
Avatar
bruhh
Avatar
Have the commented code that CASIO uses to set the indicators
Avatar
i commented that already
3:21 PM
the file is somewhere in this server
3:21 PM
but i'm not at home so i can't resend it
Avatar
You haven't sent it though
3:23 PM
Definitely glad to know that I put 2 hours in doing totally meaningless thing 💀
3:25 PM
Ah nice your comments are not... complete
Avatar
they were from a month ago soooo
Avatar
yeahhhhh
3:26 PM
Still salty about the fact that I was suffering for nothing
3:26 PM
All of which is your fault because you commented the code & wrote the frontend
3:27 PM
Well J/K I appreciate your work and recently I'm using your frontend to debug my emulation code more and more often
Avatar
oh frick it is bugged
3:29 PM
if you add a way to set up the regions or a flag to set the hardware type then i can add support for CWI and fx-82SOLAR II
Avatar
No, you need to implement memory mapping yourself
Avatar
yes, the region setup is in the frontend
Avatar
For CWI, it should be easy to just use a LUT; For 82SOLAR II, just make everything above page 0 unmapped
Avatar
also segment 4 needs to be R/W
Avatar
Avatar
Steveyboi
yes, the region setup is in the frontend
No, you need to write the memory mapping thing in C and recompile it to use it
Avatar
Avatar
Steveyboi
also segment 4 needs to be R/W
or else emu kb will not work
Avatar
Avatar
Steveyboi
also segment 4 needs to be R/W
No, everything above page 0 is read-only
Avatar
Avatar
ArNeKJ
No, you need to write the memory mapping thing in C and recompile it to use it
that just sucks :(
Avatar
Yes my emulator sucks
3:32 PM
Mainly because 1) I am a bad programmer and 2) I didn't plan to make it support non-ES+ models
3:33 PM
Ah and my emulator does not emulate SMALL model
3:33 PM
Just write one yourself or use others' emulators which are better & easier to use lol
Avatar
hmm there doesn't appear to be anything wrong with my code
Avatar
Gonna compensate for the fact that I spent 2 hours working for nothing
3:34 PM
Off to sleep!
3:34 PM
Maybe you have fixed it or something
3:38 PM
Maybe you didn't make the image clipping thing right
Avatar
nah i think its correct
Avatar
But setting the memory to 0x40 does light MAT and VCT
Avatar
yeah only MAT should light up
6:38 PM
i will check my code when i get home
Avatar
i'm on my laptop now
8:58 PM
time to check that MAT and VCT thing
9:03 PM
looks like the status bar detection is correct
9:03 PM
something else must be wrong...
9:08 PM
the bug is also in u8-emu-frontend
Avatar
yea i think the cropping is wrong
9:49 PM
there, fixed
👍 1
Avatar
The Administrator 10/3/2023 1:23 PM
1:27 PM
Does it calculate?
Avatar
Avatar
ArNeKJ
Does it calculate?
The Administrator 10/3/2023 1:30 PM
no all results are just 0
1:30 PM
Avatar
Sadge
Avatar
Avatar
ArNeKJ
Sadge
The Administrator 10/3/2023 1:38 PM
do you have an idea of what could be causing this bug
Avatar
I don't know, mine returns ERROR on any calculation when emulating real 570ES+ (edited)
Avatar
Avatar
The Administrator
do you have an idea of what could be causing this bug
idk
3:19 PM
the first community-made CWII emulator
3:20 PM
owner has become a pro
3:22 PM
i better add support for CWII when i get home
Avatar
GammaVelorum 10/3/2023 4:23 PM
how would i go about unit testing an emulator?
4:23 PM
to make sure all the instructions parse and run as intended
Avatar
Do all the things in the rom work
4:23 PM
First start by getting diag mode to work
4:24 PM
As is simple and you know the expected output
4:24 PM
Then just try stuff
Avatar
Yes that
4:27 PM
or write a tester ROM
4:27 PM
It's possible to manually check for easy instructions and then test complicated instructions automatically
Avatar
for CWI, if you need to test emu kb, use CY000
Avatar
I want to take another approach that tests the emulator by starting with mov psw, #imm8
8:23 PM
But anyway that's for later me. Off to sleep!
Avatar
i'm on my laptop now
8:50 PM
time to work on CWII support
Avatar
Only the screen and regions need changing right?
Avatar
yeah i think
Avatar
Well I'm happy, will be more testing of my core (edited)
9:05 PM
Since I'm still not 100% on everything
Avatar
mine doesn't calculate 😭
Avatar
rip
Avatar
i spent time doing other things that i no longer have time to add CWII support
10:46 PM
i will add it tomorrow if i have time
10:47 PM
probably in the evening again, since i have homework to do tomorrow
10:54 PM
actually i have at least 2 hrs in the morning
Avatar
hmm, casio's web simu8... sets the data memory as from 9000H to 18:FFFFH?
6:35 AM
SEGMENT 18??????
6:37 AM
whatever, let's just set up the rom window and data segment 1 - 7 for now...
Avatar
first attempt at CWII
6:51 AM
also CWII is the only rom that uses DSR: prefix (edited)
6:53 AM
this is probably because the regions are wrong
Avatar
huh
7:00 AM
segment 10 is also used
7:01 AM
and segment 9 also
Avatar
i found a screen buffer
7:22 AM
0:D654H (edited)
Avatar
so for some reason its grabbing garbage data
7:33 AM
idk
7:39 AM
wait no
7:39 AM
i'm just stupid
7:40 AM
there is no segment 9 or 10 (edited)
Avatar
also the rom uses dsr prefix + double word instructions
7:49 AM
also this is very strange 2:5342H 0050 MOV R0, #50H 2:5344H D0F6 ST R0, -AH[FP] 2:5346H 0072 MOV R0, #72H 2:5348H D0F7 ST R0, -9H[FP] 2:534AH 0065 MOV R0, #65H 2:534CH D0F8 ST R0, -8H[FP] 2:534EH 0073 MOV R0, #73H 2:5350H D0F9 ST R0, -7H[FP] 2:5352H D0FA ST R0, -6H[FP] 2:5354H 0020 MOV R0, #20H 2:5356H D0FB ST R0, -5H[FP] 2:5358H 0041 MOV R0, #41H 2:535AH D0FC ST R0, -4H[FP] 2:535CH 0043 MOV R0, #43H 2:535EH D0FD ST R0, -3H[FP] 2:5360H 0000 MOV R0, #00H 2:5362H D0FE ST R0, -2H[FP] 2:5364H E000 MOV ER0, #00H 2:5366H B0F4 ST ER0, -CH[FP] 2:5368H 0045 MOV R0, #45H 2:536AH 90E9FFCA ST R0, -0036H[ER14] 2:536EH 0059 MOV R0, #59H 2:5370H 90E9FFCB ST R0, -0035H[ER14] 2:5374H 002D MOV R0, #2DH 2:5376H 90E9FFCC ST R0, -0034H[ER14] 2:537AH 0030 MOV R0, #30H 2:537CH 90E9FFCD ST R0, -0033H[ER14] 2:5380H 0032 MOV R0, #32H 2:5382H 90E9FFCE ST R0, -0032H[ER14] 2:5386H 0033 MOV R0, #33H 2:5388H 90E9FFCF ST R0, -0031H[ER14] 2:538CH 0000 MOV R0, #00H 2:538EH 90E9FFD0 ST R0, -0030H[ER14] 2:5392H 90E9FFD1 ST R0, -002FH[ER14]
7:49 AM
this code is in a function called in diagnostic
7:50 AM
it simply writes this to stack
7:50 AM
the EY-023 also seems to be hard-coded instead of read from the rom
7:52 AM
and also the revision is actually read at 0:00E2H
7:53 AM
as evidenced by this code 2:53F0H 0000 MOV R0, #00H 2:53F2H 90E9FFC4 ST R0, -003CH[ER14] 2:53F6H 0056 MOV R0, #56H 2:53F8H 90E9FFD1 ST R0, -002FH[ER14] 2:53FCH 002E MOV R0, #2EH 2:53FEH 90E9FFD2 ST R0, -002EH[ER14] 2:5402H 901000E2 L R0, 00E2H 2:5406H 90E9FFD3 ST R0, -002DH[ER14] 2:540AH 901000E3 L R0, 00E3H 2:540EH 90E9FFD4 ST R0, -002CH[ER14] 2:5412H 0020 MOV R0, #20H 2:5414H 90E9FFD5 ST R0, -002BH[ER14] 2:5418H 0042 MOV R0, #42H 2:541AH 90E9FFD6 ST R0, -002AH[ER14] 2:541EH 0074 MOV R0, #74H 2:5420H 90E9FFD7 ST R0, -0029H[ER14] 2:5424H 0020 MOV R0, #20H 2:5426H 90E9FFD8 ST R0, -0028H[ER14]
Avatar
it ends up writing this to stack (edit: i realized that the zeroes are the serial number, so the text is printed first then the qr code, since the serial number overwrites the Press AC text) (edited)
8:02 AM
this is going great :)
Avatar
Avatar
Steveyboi
this is going great :)
u are going to change the qr code?
Avatar
no
8:03 AM
just bug
8:03 AM
first i have to find where code segment 0 is mapped in data memory
8:04 AM
ah, 0:00D8H has the Reset All string
8:04 AM
lemme try to find the code that uses it (edited)
8:06 AM
ah, right here 0:A7F2H 02D8 MOV R2, #D8H 0:A7F4H 0300 MOV R3, #00H 0:A7F6H 0021 MOV R0, #21H 0:A7F8H F101FEC8 BL f_1FEC8
8:07 AM
in diagnostic
Avatar
i'm on my PC now, still same problem
8:32 AM
oh hell nah
8:33 AM
the fx-92 College emulator manual has no keymap
8:33 AM
looks like i have to search myself
Avatar
times up
9:12 AM
gotta do homework now
9:12 AM
also, i tested, and its the same as beucalc
9:12 AM
1+1=0
9:13 AM
looks like there is something else
9:13 AM
that is missing
Avatar
Avatar
Steveyboi
looks like there is something else
GammaVelorum 10/4/2023 10:23 AM
is this usually because an instruction is implemented wrongly or something else
Avatar
no
10:52 AM
probably related to memory regions
Avatar
Look at that 8-pixel-wide blanks lol
Avatar
the text renders just fine
11:33 AM
but not the home screen
11:33 AM
weird
11:34 AM
also cursor doesn't render
Avatar
i finished implementing the screen
Avatar
fx-880BTG, same problem
12:04 PM
also thats the wrong rom
12:04 PM
this is correct rom
12:07 PM
also if you look closely on this screen you will see there are no arrows (edited)
Avatar
Avatar
Steveyboi
i finished implementing the screen
MeowIce | fx-799VN/fx-880BTG 10/4/2023 12:08 PM
Does 880btg have this color var ?
Avatar
no
12:08 PM
don't think so
12:08 PM
yeah no
12:08 PM
its only for fx-92 Collège and fx-92B Secondaire
Avatar
Avatar
Steveyboi
also if you look closely on this screen you will see there are no arrows (edited)
this is how it should look
12:09 PM
(pic from classwiz emulator @ https://e.caduo.eu.org)
12:11 PM
2BPP converted to 1BPP just looks weird
Avatar
ok so i wasn't able to finish setting up the 2BPP
12:27 PM
i ran out of time
12:27 PM
that means tonight
12:27 PM
once again
12:28 PM
thankfully i don't have cram school on thursday through sunday
Avatar
@Steveyboi I have been wondering if you went to school ngl because you are texting close to when I wake up, all through the day, and then after I go to sleep as well
1:19 PM
And aren't you 13
1:19 PM
Every time I came out of a class at school I had a new notification from here and it was often you lmao (edited)
Avatar
Avatar
Lumiobyte
Every time I came out of a class at school I had a new notification from here and it was often you lmao (edited)
timezones
Avatar
Avatar
Lumiobyte
Every time I came out of a class at school I had a new notification from here and it was often you lmao (edited)
Lol true
1:27 PM
He surely likes sending messages
Avatar
Avatar
Lumiobyte
Every time I came out of a class at school I had a new notification from here and it was often you lmao (edited)
maybe he bring his phone to the school
Avatar
Indeed lol
Avatar
Avatar
4uyn
maybe he bring his phone to the school
isn't it obvious..
Avatar
Avatar
Lumiobyte
And aren't you 13
i hope no one reports me
Avatar
Avatar
Steveyboi
i finished implementing the screen
is this how it works or it has been applied with a "special procedure" to have this 1+1=0
Avatar
idk
5:29 PM
beucalc also has this problem
5:30 PM
that is unintended, 1+1 is definitely not 0
Avatar
so it's like a bug
Avatar
yes
Avatar
The Administrator 10/4/2023 6:48 PM
my emulator appears to render everything correctly
6:48 PM
6:49 PM
Avatar
The Administrator 10/4/2023 7:00 PM
Avatar
yes
7:32 PM
because you have 2BPP
7:32 PM
i don't have it yet
7:33 PM
i will finish implementing it tonight
Avatar
GammaVelorum 10/4/2023 7:39 PM
whats 2bpp
Avatar
Avatar
The Administrator
Click to see attachment 🖼️
GammaVelorum 10/4/2023 7:40 PM
also the darker box seems to have some extra pixels in the bottom left, is that intended?
Avatar
Avatar
GammaVelorum
whats 2bpp
2 bits per pixel
Avatar
Avatar
GammaVelorum
also the darker box seems to have some extra pixels in the bottom left, is that intended?
That's part of the cursor
Avatar
GammaVelorum 10/4/2023 8:12 PM
why would there be 2 bits per pixel
8:12 PM
4 different brightness levels?
Avatar
today's screens are like a bajillion bits per pixel
Avatar
time to finish up the 2BPP
8:54 PM
before, i was too hesitant so i did not commit
8:54 PM
so now i have to use SMB to get the modified scripts
8:56 PM
uh oh i did not save as well
8:56 PM
so i will have to set up the status bar stuff again
Avatar
ok i finished
9:31 PM
30 minutes
9:31 PM
of setting up the keyboard and the images
9:32 PM
and the config file
9:32 PM
beautiful QR code
9:34 PM
uh oh, new problem
9:34 PM
overlapping keybinds
9:34 PM
i'll have to write code to handle them in the future
Avatar
ok so i am halfway done
9:58 PM
the screen data is now just numbers between 0 and 3
10:04 PM
colors of CWII screen (emulator): 1: #AAAAAA (R: 170, G: 170, B: 170) 2: #555555(R: 85, G: 85, B: 85) 3: #000000(R: 0, G: 0, B: 0) (edited)
10:04 PM
just for reference
10:09 PM
haha! there we go
10:11 PM
aaaand that is not good
10:15 PM
broken colors...
10:21 PM
i will investigate further tomorrow
Avatar
Best strategy: off to sleep
Avatar
ok so i have school on thursday and friday mornings, so i can't do it now
6:35 AM
i may do it when i get home (edited)
Avatar
unusual schedule you have
Avatar
look at that, much better
10:22 AM
on the laptop i set the pixel size to 1.5 (edited)
10:22 AM
so it looks a bit weird
10:22 AM
but here i set it to 2, much better
10:23 AM
(i set it to 1.5 on laptop because 2 would be too big for a 1080p screen, my PC uses a 1440p screen) (edited)
10:30 AM
huh, the buffer is... normal
10:34 AM
hang on there's another buffer for the input screen
10:35 AM
ayyyy
10:35 AM
the buffers are ok
10:35 AM
but the LCD is... not?
10:36 AM
weird
Avatar
image 1: buffer image 2: LCD
10:44 AM
idk why this is happening
10:46 AM
but hey, i like the QR code :)
10:47 AM
here's the link used
10:49 AM
also this is stuck on the screen forever
10:50 AM
in the checksum screen, the QR code and the text are stored in seperate buffers
10:50 AM
but here, only the QR code is copied over... hmm
Avatar
so, problems:
  • 8 pixel wide gaps
  • no cursor
  • LCD screen glitches
  • QR code generation fails
Avatar
I threw my test ROM out of window and started from scratch
Avatar
Ok so my core is probably busted (edited)
Avatar
well it can run CWI ok so that's a win
2:30 PM
this is one of the first community-made CWII emulators after all
Avatar
How about my core 🤔
2:36 PM
Oh well probably no if it requires writing to data segment 1+
Avatar
yeah CWII writes to segment 8+
2:45 PM
How many data segments are there??
Avatar
on casio's web emu it allocates 0x18 data segments
2:53 PM
i only know that segment 8 is used
2:53 PM
however not quite sure about 9+
2:54 PM
lemme try removing them to see what happens
2:56 PM
i will do that when i'm home ofc
Avatar
Avatar
Steveyboi
on casio's web emu it allocates 0x18 data segments
HOLY-
Avatar
The ROM window size is interesting
3:31 PM
It's 0x9000 bytes
Avatar
yea
3:31 PM
smaller than CWI
Avatar
But how many of the data memory is writable
Avatar
0x7000 bytes in segment 0
3:32 PM
including SFRs
3:32 PM
oh wait SFRs aren't data memory
3:32 PM
so only 0x6000 bytes
3:33 PM
at least 0x10000 bytes in segment 8(+?)
Avatar
GammaVelorum 10/5/2023 5:42 PM
was thinking of something right now emulators focus on translating the individual instructions from machine code during runtime is it possible to, lets say, do the translation beforehand so when we run the rom we wont need to interpret the instruction during runtime?
Avatar
Yes, that's called JIT
Avatar
GammaVelorum 10/5/2023 5:42 PM
not like it would make much of a difference but maybe we could optimize the compiled result so the rom runs faster
Avatar
Avatar
ArNeKJ
Yes, that's called JIT
GammaVelorum 10/5/2023 5:43 PM
i thought just in time means compiling as the program runs
Avatar
calc84maniac's GB emulator for TI-84 Plus series use JIT translation
Avatar
GammaVelorum 10/5/2023 5:43 PM
w
Avatar
so how to make my frontend faster
5:43 PM
w/o switching languages
Avatar
It translates GB instructions into Z80 instructions/code segments
Avatar
Avatar
Steveyboi
so how to make my frontend faster
Use a better backend
5:43 PM
Maybe also get a better computer
Avatar
GammaVelorum 10/5/2023 5:44 PM
maybe we could compile the rom into intermediate representation and have an emulator execute that instead
Avatar
also when i press ON on home screen it goes into a weird mode...
Avatar
Avatar
GammaVelorum
maybe we could compile the rom into intermediate representation and have an emulator execute that instead
nah
5:45 PM
i don't think that's emulation
Avatar
Avatar
GammaVelorum
i thought just in time means compiling as the program runs
Compiler kinda translates one language to another
Avatar
C -> machine code
Avatar
So of course we can 'compile' U8 assembly to host machine assembly
Avatar
GammaVelorum 10/5/2023 5:46 PM
really
Avatar
It's possible but I never learnt technics to do that
Avatar
GammaVelorum 10/5/2023 5:46 PM
but if its host machine assembly wont that mean the rom becomes a separate program
Avatar
yeah i think
Avatar
GammaVelorum 10/5/2023 5:46 PM
then how to attach frontend
Avatar
idk
5:47 PM
integrate it into the final EXE ig?
Avatar
Avatar
GammaVelorum
but if its host machine assembly wont that mean the rom becomes a separate program
Yes if you do the translation before running
Avatar
so during running is just fine?
5:48 PM
BTW weird home screen, i just press [ON] (goes into a weird mode) then [HOME] (edited)
Avatar
Avatar
Steveyboi
so during running is just fine?
That's called JIT and it boosts execution speed without translating the whole ROM before runtime
5:49 PM
Also means you don't need to analyze its code to know what gets run and what is data
Avatar
time to find where the home screen graphics are in the rom
5:58 PM
i will just use fx-92 college rom
5:58 PM
since its the only official emulator
5:58 PM
(i can dump the screen data from memory)
5:59 PM
don't tell me i can dump from the web emulator because it is a bit more difficult then just viewing memory in cheat engine on offline emulator ok
Avatar
GammaVelorum 10/5/2023 6:02 PM
what im slightly concerned about is how an emulator might take a lot more cycles to do the same thing than the real cpu
6:02 PM
like maybe the assembly the compiler produces is longer than needed (edited)
Avatar
my brother is home
6:06 PM
so i have to switch computers again
6:06 PM
and i hate this laptop
6:07 PM
dual screen, but no 1440p
6:08 PM
just look at this
6:08 PM
i could make it better but too lazy
6:09 PM
anyways time to find the home screen graphics
6:10 PM
also wrong rom
Avatar
ah
6:42 PM
maybe it's a problem with the DSR: prefix?
Avatar
ya it's definitely the DSR
6:53 PM
in fx-92 college emu rom the home screen graphics appear to be in segment 4
6:53 PM
a DSR prefix is used which sets DSR to 4
6:54 PM
then after a DSR: prefix, DSR changes to... E4?????
7:00 PM
i simply added this line if self.sim.core.regs.dsr > 8: logging.warning(f'DSR is above 8 (DSR = {self.sim.core.regs.dsr:02X})') and this appears
Avatar
GammaVelorum 10/5/2023 7:01 PM
are there actually 30 segments or just a bug
Avatar
bug
7:01 PM
also that DSR is hex
Avatar
GammaVelorum 10/5/2023 7:01 PM
whats the instruction that set dsr to 30
Avatar
only DSR prefix instructions can change the DSR
7:02 PM
there is no reason for it to be that high
Avatar
GammaVelorum 10/5/2023 7:02 PM
is your emulator capable of showing you the actual bits in the instruction (edited)
Avatar
yes
Avatar
GammaVelorum 10/5/2023 7:02 PM
then does it look like its actually a dsr prefix that sets it to 0x30
Avatar
no ofc not
Avatar
GammaVelorum 10/5/2023 7:03 PM
bug
Avatar
yup
Avatar
GammaVelorum 10/5/2023 7:03 PM
👍
7:03 PM
just asking to see what problems i might face when i write my emulator
7:03 PM
meanwhile what should i call it
Avatar
Avatar
Steveyboi
yup
GammaVelorum 10/5/2023 7:03 PM
tell us whats the bug when you fix it
Avatar
Avatar
GammaVelorum
meanwhile what should i call it
what programming language do you plan to use?
Avatar
GammaVelorum 10/5/2023 7:04 PM
rust
Avatar
maybe RU8st
7:04 PM
i like putting the programming language name in the program name
7:04 PM
i named my emu PyU8
7:05 PM
anyways i changed the DSR logging to this if self.sim.core.regs.dsr > 8: logging.warning(f'DSR is above 8 (DSR = {self.sim.core.regs.dsr:02X}) @ {self.sim.core.regs.csr:X}:{self.sim.core.regs.pc:04X}H')
7:05 PM
it now shows the instruction that did the- oh wait
7:06 PM
its the instruction after....
7:06 PM
no worries, just use prev_csr_pc
Avatar
GammaVelorum 10/5/2023 7:07 PM
so what was the problem
Avatar
DSR: prefix
7:07 PM
CWII uses it a lot
7:07 PM
while ES, ES+ and CWI do not
7:07 PM
so they work fine
Avatar
GammaVelorum 10/5/2023 7:07 PM
why using it a lot breaks it though
Avatar
idk
Avatar
Avatar
Steveyboi
maybe RU8st
GammaVelorum 10/5/2023 7:08 PM
i called it VelorumU8 for now
Avatar
[05/10/2023 19:06:04] WARNING: DSR too high (DSR = C0) @ 3:CC52H
7:11 PM
3:CC52H FE9FA2690002 ST ER2, DSR:+0002H[ER6]
7:11 PM
anyways i go have dinner now
Avatar
oh figured it out
7:28 PM
with DSR: prefixing
7:28 PM
I never actually read the DSR lol
7:28 PM
going to go for food
7:28 PM
is an easy fix
Avatar
Avatar
Delta
I never actually read the DSR lol
bruh moment
Avatar
well ES never needed it
7:30 PM
so I didn't notice it
7:30 PM
also just fixed it
7:30 PM
rebuild and try
Avatar
good news! it works
Avatar
why is the screen funky looking
Avatar
pixel size is 1.5
7:33 PM
i can (try to) fix it (edited)
7:33 PM
but too lazy
7:34 PM
does it calculate correctly?
Avatar
nope
7:35 PM
cursor still doesn't blink
Avatar
do any of the operations work?
Avatar
no, i think
7:40 PM
calculating sin^-1(cos^-1(tan^-1(tan(cos(sin(9 rn
7:41 PM
its... taking a bit long
7:44 PM
i gave up
7:45 PM
i think it got stuck in a loop
7:45 PM
ok that is definitely not supposed to happen
7:45 PM
its math box > dice roll
7:46 PM
attempts should be set to 5 by default
7:46 PM
and it only allows a range between 1-250
7:47 PM
i press execute and... oh boy, it returns....
7:49 PM
and you can't even do overflow on here
7:49 PM
without knowing where the variable memory is in... memory
7:49 PM
since variable menu hangs when trying to assign a variable to a value
7:51 PM
however you can assign functions
7:51 PM
just that... they don't work
7:51 PM
also it looks like SFRs are also used as data memory nah no (edited)
Avatar
later if i have time i will try to find why the cursor doesn't appear
Avatar
ah look at that, much better
11:39 AM
so the buffer does display the cursor, hmm
11:40 AM
just not flashing
Avatar
Avatar
Steveyboi
i press execute and... oh boy, it returns....
Honestly wish my ClassWIZ looked like this
1:21 PM
for real
Avatar
ok so it looks like the function that draws the cursor is a different function
6:36 PM
no it is not render
6:36 PM
its f_2B094 in fx-580VN X real rom
6:36 PM
not labeled by user
6:38 PM
the cursor data looks to be taken from the buffer
6:38 PM
obviously
Avatar
so 91C9H is the current screen buffer
6:50 PM
same as CWI
6:51 PM
0 = D654H, !=0 = CA54H
Avatar
so i think i found the function that draws the cursor on CWII
7:51 PM
its f_38018 on fx-92 Collège emu rom
Avatar
the problem seems to be... CMPC?
7:58 PM
3:8028H 70FF CMP R0, #FFH 3:802AH 51FF CMPC R1, #FFH 3:802CH C302 BLE .l_01A 3:802EH F30080E2 B f_380E2
7:59 PM
ER0 is usually F8x2
7:59 PM
at BLE it never jumps
8:03 PM
image 1: at CMP image 2: at CMPC image 3: at BLE
8:06 PM
after CMP, the carry flag is set so CMPC would do F8 - FF - 1
Avatar
Oh yeah CMPC is sketchy
Avatar
woah
8:10 PM
bingo
8:10 PM
here i'm reading the japanese manual
8:10 PM
8:11 PM
on the carry flag it says "演算の結果、ビット 7 にボローが発生したとき 1 になり 、それ以外の時は0 になります。"
8:11 PM
google translate: "Becomes 1 when a borrow occurs in bit 7 as a result of the operation, and becomes 0 otherwise." (edited)
8:12 PM
crap lapis lied again
8:12 PM
its bit 7
8:12 PM
not bit 15
Avatar
Am out rn
8:14 PM
Have no idea what my core does
8:14 PM
But it's probably wrong
Avatar
hmm
+ byte[0xF025] : Bit 0 control whether the timer run. Note that writing to this SFR does not reset the counter.
(https://community.casiocalc.org/topic/7583-fx-82-83gt-115-991es-plus-hacking/page-8#entry61337)
(edited)
Avatar
Currently, my emulator tester looks like this
3:49 PM
(the source file, if anyone wants to improve it or modify it or something)
Avatar
Are you going to emulate the Algebra FX Series after you hack wide open and open source emulate FX-991ES PLUS-2? Or is it based on completly different CPU? (edited)
Avatar
According to wikipedia they use the NEC V30MX
2:35 AM
Very different
2:37 AM
It's 8086
Avatar
more like 8088 with some 80188 features & NEC's own instructions
Avatar
i wonder how did casio manage to create that one function with a bunch of ReadCodeMemory calls in their emulators
10:48 PM
they definitely didn't just call ReadCodeMemory a bunch of times in the source code, so how did they do it? (edited)
Avatar
What are you talking about..?
Avatar
you mean write code memory?
10:50 PM
the one where it populates the code memory (edited)
Avatar
oh yea
10:55 PM
mistake
10:55 PM
write not read
Avatar
no idea
10:57 PM
maybe automated via a script
10:57 PM
maybe a compiler going crazy with loop unrolling
11:46 PM
o that makes sense
11:46 PM
Just gotta handle ghosting
Avatar
The Administrator 10/9/2023 5:37 PM
i suspect that the 0:F4XXh stuff needs to be implemented in order for cwii roms to work properly
Avatar
and i still don't know why checksum calculation uses segment 8
Avatar
due to the segment 8 thing, the checksum is always different
7:44 AM
every time you call diag_checksum
Avatar
ohh i see what's wrong with the CMPC
8:31 AM
the carry flag is added to the second operand
8:32 AM
that is definitely not how it works
8:32 AM
in the case of the CMPC for the cursor
8:33 AM
ER0 holds an address to screen data
8:33 AM
it does this in the code 3:E4F8H F085 MOV ER0, ER8 3:E4FAH E082 ADD ER0, #02H 3:E4FCH 70FF CMP R0, #FFH 3:E4FEH 51FF CMPC R1, #FFH 3:E500H C302 BLE .l_01A 3:E502H F300E5B6 B f_3E5B6
8:34 AM
the two CMP and CMPCs are to check if ER0 <= 0xFFFF
8:35 AM
nothing special in the first CMP, usually the carry flag will always be set here
8:35 AM
but in the CMPC, since the carry flag is added to the second operand
8:35 AM
it does R1 - (0xFF + 1) = R1 - 0
8:36 AM
so no carry, which is definitely wrong
8:36 AM
the correct way should be R1 - 0xFF - 1
8:36 AM
the two are the same but the latter is more accurate
8:37 AM
if you use the latter, you can definitely detect a carry
8:38 AM
if you use the former, in most cases it works, however it doesn't work always
8:39 AM
also make sure to take note of this if you (the reader) are going to write an emulator (edited)
👍 1
Avatar
Oh yeah that
8:45 AM
I knew it was sorta wrong
8:45 AM
Is 2:45 and I'm just back from a club
8:46 AM
Will fix tomorrow ok
8:51 AM
If you want a drunken fix, try this in sub_impl
8:55 AM
// Sign extend uint64_t m = 1 << (size * 8); val0 |= (val0 & (m >> 1)) << 1; val1 |= (val1 & (m >> 1)) << 1; val0 = (val0 ^ m) - m; ...
8:55 AM
Should work
8:55 AM
Maybe
8:57 AM
@Steveyboi
9:02 AM
drunken indeed
9:02 AM
it just fcked the screen
Avatar
Avatar
Steveyboi
it does R1 - (0xFF + 1) = R1 - 0
GammaVelorum 10/10/2023 9:43 AM
so when you add FF and 1 together it makes 0
9:44 AM
so the thing doesnt always work
Avatar
Avatar
Steveyboi
but in the CMPC, since the carry flag is added to the second operand
We don't know if the physical core does the subtraction in 1 step or 2 steps
9:52 AM
Same for ADDC R0, #FFh while R0 is 0 and Carry is set
9:53 AM
If the addition is done in 1 step, then it's just add r0, 0 so CZSV is 0100; But if the addition is done in 2 steps, CZSV should be 1100
9:54 AM
CMP and CMPC takes same amount of cycles, btw
Avatar
Avatar
Steveyboi
it does this in the code 3:E4F8H F085 MOV ER0, ER8 3:E4FAH E082 ADD ER0, #02H 3:E4FCH 70FF CMP R0, #FFH 3:E4FEH 51FF CMPC R1, #FFH 3:E500H C302 BLE .l_01A 3:E502H F300E5B6 B f_3E5B6
so i thought again
5:24 PM
if you treat 0xFFFF as signed then it would mean the code checks if ER0 is negative
5:25 PM
there is no reason for it to be unsigned, because if so then it would always jump
5:28 PM
yeah actually i think the CMPC is correct
5:29 PM
aaaand i thought again
5:29 PM
the branch instruction is... unsigned
5:29 PM
yeah no CMPC is wrong
Avatar
the heck
Avatar
Isn't that just CMP ER0, 0FFFFh
6:52 PM
Arithmetic instructions like add, sub, etc., operates on any data
6:53 PM
If you want signed result, treat the MSb as the sign bit; If you want unsigned result, just ignore its signedness
6:54 PM
For example, add r0, 7fh when R0 is 2 returns 81hin R0, and CZVS are set to 0011
6:57 PM
You can either treat it as unsigned(so it's 7Fh+02h=81h, so it's NC, NZ), or signed (so it's +7Fh + +02h = -7Fh, so NZ, OV, NS)
6:59 PM
They always calculates the results for both signed and unsigned, you just take & use the parts you need
Avatar
The Administrator 10/11/2023 7:19 PM
beucalc v0.4b (test build)
7:34 PM
is it normal to post sth in multiple channels?
Avatar
Nice! Does it calculate now?
Avatar
CWII? no
9:06 PM
pre-CWII? yes
9:06 PM
(i tested it)
9:06 PM
also i keep forgetting that space is pause/unpause
9:07 PM
i usually map space to AC
9:07 PM
(like the official emu) (edited)
Avatar
Avatar
Steveyboi
pre-CWII? yes
So it behaves the same as real calculator?
Avatar
well, not entirely of course
9:08 PM
actually i haven't tested any an hacks
9:08 PM
lemme do that now
9:08 PM
crap F2 is not mapped
9:09 PM
also a bit annoying because the keyboard is laid out as KI/KO table style
Avatar
No I mean, does it calculate 1+1
Avatar
yes it does, on pre-CWII
Avatar
if so I can use it as reference implementation
9:10 PM
ok
Avatar
well, 1an/111111111111Ans^1 behaves like my frontend
Avatar
Avatar
The Administrator
beucalc v0.4b (test build)
Does your emulator have debugging features, like setting breakpoints?
Avatar
don't see it
Avatar
If no, is there any easy way to add it?
Avatar
don't think so
Avatar
Who asked
Avatar
you asked
Avatar
Bruh sometimes you can not send messages when you don't know something 😂
Avatar
how to use diag mode on emulator
11:12 PM
cant plug 3 mice into the computer 🐧
Avatar
For Bacteria's emulator, there's a button called "hold SHIFT+7" so you can use that
11:15 PM
in gwetm's frontend... I don't know
11:15 PM
user's emulator supports holding keys by right-clicking on the button
Avatar
Avatar
ArNeKJ
in gwetm's frontend... I don't know
hold F1 and 7 on the keyboard and press F4 (edited)
Avatar
theres no other way?
Avatar
nope...
Avatar
hey delta can you implement the clock cycle stuff (edited)
8:31 PM
What (edited)
8:31 PM
Like a cycle counter?
Avatar
yea
8:34 PM
also maybe make something like a global variable that stores the executed instruction's execution time
Avatar
No globals
8:36 PM
God struct better
Avatar
tries to be patient
Avatar
I'm at uni, I have work to do
6:57 PM
And also drinking
Avatar
also can someone improve my frontend's hex editor
8:22 PM
good
Avatar
sweet
12:37 PM
(i hacked in the inverse functions)
Avatar
So FC-200V has inverse trigonometry functions but users cannot input the tokens?
1:25 PM
Also who's core you're using?
Avatar
delta's core
1:26 PM
also in that picture i used the ES/ES+ status bar image
Avatar
So delta's core can do calculations fine?
Avatar
ya
Avatar
Mmm, another reference implementation
Avatar
i think you would've realized that long ago...
Avatar
I've been busy lately didn't check the messages
Avatar
also first screen of diagnostic
1:28 PM
just the text was changed, the bit locations aren't
1:28 PM
CMPLX -> 360 MAT -> SI VCT -> DMY
1:28 PM
Math was removed
1:28 PM
so i just made its crop box have a width and height of 0
1:29 PM
also weirdly on real hardware FC-200V has MODE P0 = Pd value 1
1:30 PM
but on the emulator it has Pd value 0 = MODE P-
1:30 PM
strange
Avatar
The Administrator 10/15/2023 1:43 PM
fc100v/200v files for beucalc 0.4b place the contents in your beucalc folder (where the beucalc.jar is stored)
Avatar
FC-100/200V files for u8-emu-frontend. To run: extract all the files in the root folder then run python main.py <config filename>
Avatar
i just discovered
2:06 PM
oh wait should move to #nx-u8
Avatar
The Administrator 10/15/2023 2:54 PM
diagnostic now responds to 9 on fx-plus ver a/b trial roms
Avatar
nice
Avatar
ok so i added a keyboard SFR toggle for emulator ROM mode
3:22 PM
it may slow down the frontend (because it needs to set both the keyboard SFRs and the emulator keyboard area)
3:22 PM
so i left it as a toggle
Avatar
so, i actually found the reason why the version screen in ES ROM 018 doesn't work
4:23 PM
this is end of the version screen code .l_05A: 0:465CH F0012FFC BL render 0:4660H F0014400 BL check_ac.set_ko 0:4664H 8000 MOV R0, R0 0:4666H C9FA BEQ .l_05A 0:4668H F001432C BL set_f046 .l_06A: 0:466CH A1EA MOV SP, ER14 0:466EH CEC7 BAL diag_scr_box_ws.exit
4:23 PM
it calls check_ac.set_ko which is this check_ac.set_ko: 0:4400H F8CE PUSH LR 0:4402H FA5E PUSH ER10 0:4404H 0A44 MOV R10, #44H 0:4406H 0BF0 MOV R11, #F0H 0:4408H 02EF MOV R2, #EFH 0:440AH 92A1 ST R2, [ER10] 0:440CH E000 MOV ER0, #00H 0:440EH CE0B BAL check_ac.exit check_ac: 0:4410H 0203 MOV R2, #03H .l_002: 0:4412H A0A1F040 TB F040H.2 0:4416H C807 BNE .exit 0:4418H 12FF ADD R2, #-1H 0:441AH C8FB BNE .l_002 0:441CH 0004 MOV R0, #04H 0:441EH 0110 MOV R1, #10H 0:4420H 901380F2 ST ER0, 80F2H 0:4424H E001 MOV ER0, #01H .exit: 0:4426H F00143E4 BL set_ko_ff 0:442AH FA1E POP ER10 0:442CH F28E POP PC
4:24 PM
if you look closely, check_ac.set_ko only... sets KO
4:24 PM
it doesn't go to the actual check function
4:24 PM
therefore softlocking you
4:30 PM
here i modified my disassembler output check_ac: 0:4400H F8CE PUSH LR 0:4402H FA5E PUSH ER10 0:4404H 0A44 MOV R10, #44H 0:4406H 0BF0 MOV R11, #F0H 0:4408H 02EF MOV R2, #EFH 0:440AH 92A1 ST R2, [ER10] 0:440CH E000 MOV ER0, #00H 0:440EH CE0B BAL .exit .check: 0:4410H 0203 MOV R2, #03H .loop: 0:4412H A0A1F040 TB F040H.2 0:4416H C807 BNE .exit 0:4418H 12FF ADD R2, #-1H 0:441AH C8FB BNE .loop 0:441CH 0004 MOV R0, #04H 0:441EH 0110 MOV R1, #10H 0:4420H 901380F2 ST ER0, 80F2H 0:4424H E001 MOV ER0, #01H .exit: 0:4426H F00143E4 BL set_ko_ff 0:442AH FA1E POP ER10 0:442CH F28E POP PC
4:30 PM
as you can see it only sets KO but never checks KI
4:31 PM
so what happens if you noop the jump to exit function?
4:33 PM
Avatar
Time to compare Delta's emulator and my emulator 🤔
Avatar
Ah I found one inconsistency: My tb is probably wrong
7:32 PM
159A4h contains tb r11.1 and our emulator returned different results in Z flag (edited)
Avatar
variable name conflict..?
Avatar
...wait it's C flag
7:35 PM
confusion
Avatar
bruh moment
Avatar
Nvm my cmp is wrong
Avatar
Actually no, Delta's TB implementation affects C, but the manual didn't say so
Avatar
could be contributing to the inaccurate CWII emulation
7:52 PM
also CMPC i think should be done in 2 steps F822 - FFFF should totally give carry
Avatar
Avatar
Steveyboi
it does this in the code 3:E4F8H F085 MOV ER0, ER8 3:E4FAH E082 ADD ER0, #02H 3:E4FCH 70FF CMP R0, #FFH 3:E4FEH 51FF CMPC R1, #FFH 3:E500H C302 BLE .l_01A 3:E502H F300E5B6 B f_3E5B6
here the BLE is unsigned <=
Avatar
Bruh like have you read my messages about that
8:20 PM
If it really takes 2 steps then why it only takes 1 cycle to run
Avatar
Avatar
ArNeKJ
CMP and CMPC takes same amount of cycles, btw
^
Avatar
Ok so our emulator pushes different values onto the stack... Now how do I compare the values between them (edited)
8:42 PM
Doing that manually is too tiring but I don't know how to compare values between two threads or something
Avatar
could you construct a log of memory+register writes (edited)
8:51 PM
set [0x1234] = 0x34 set r0 = 3 ...
8:51 PM
and then diff
Avatar
Yeah that could be possible
Avatar
yeah just do that...
Avatar
Ok I found that my BL ERn is wrong
8:53 PM
I saved PC+4 rather than PC+2 while the instruction is only 1 word long
Avatar
Now it calculates 1+1! But sqrt(2) returns... not 1.414213562
Avatar
Avatar
ArNeKJ
Now it calculates 1+1! But sqrt(2) returns... not 1.414213562
what does it return?
Avatar
have you pushed
9:06 PM
let me try
9:06 PM
I pushed yes
Avatar
so accurate
Avatar
ah yes very accurate
9:08 PM
forensic test gives Math ERROR
9:08 PM
what a joke 🤣 no offense btw
Avatar
I know my emulator sucks
9:09 PM
The problem is how to find the bugs & make it better (edited)
Avatar
diff memory/register logs (edited)
Avatar
I could add it to my emulator but I don't think I can modify Delta's emulator
Avatar
why not?
Avatar
Because I'm bad at C programming
9:11 PM
fair enough
9:11 PM
whats the link to delta's emulator?
Avatar
Contribute to Fraserbc/u8_emu development by creating an account on GitHub.
9:12 PM
literally typed it by hand
9:12 PM
A frontend for Fraserbc's u8_emu emulator. Contribute to gamingwithevets/u8-emu-frontend development by creating an account on GitHub.
9:12 PM
i also have a frontend for life's emu
Avatar
I am thinking about stepping both emulators & compare register values after stepping
Avatar
ya that could work
9:13 PM
i could even use two cores
9:13 PM
but too much work + too lazy
Avatar
Sure but setting up the values is...
9:14 PM
sqrt(1.9999999999999999 returns 1.414213562 🤣
Avatar
bruhhhhhh
Avatar
i mean cant you just add printf("--\n"); printf("PC: %hx\n", core->regs.pc); for (int i = 0; i < 16; i++) printf("R%d: %hhd\n", i, core->regs.gp[i]); here: https://github.com/Fraserbc/u8_emu/blob/main/src/core/core.c#L19 (edited)
Avatar
Avatar
ArNeKJ
sqrt(1.9999999999999999 returns 1.414213562 🤣
how many 9s did you type?
Avatar
Avatar
pitust
i mean cant you just add printf("--\n"); printf("PC: %hx\n", core->regs.pc); for (int i = 0; i < 16; i++) printf("R%d: %hhd\n", i, core->regs.gp[i]); here: https://github.com/Fraserbc/u8_emu/blob/main/src/core/core.c#L19 (edited)
my frontend has that built in
Avatar
Not to the point that the calculator treats it as 2
Avatar
hmm, interesting indeed
Avatar
Ah, and TABLE index are still 0
9:19 PM
Avatar
so slow
9:19 PM
partly because of the global variables, i think
9:20 PM
9:20 PM
WTF!!!!
9:21 PM
today's headlines: inaccurate emulator fixes calculator bug
Avatar
Avatar
Steveyboi
partly because of the global variables, i think
My LUT uses part of the opcode as index, and I implement all the instructions inside the switch...case structure
9:23 PM
Delta uses a LUT of masks & function pointers so it's faster & more expandable
9:26 PM
I'm a bad C programmer & I wanted to port my emulator to TI-84 Plus which has restricted memory so I had to use smaller LUT (edited)
Avatar
The Administrator 10/19/2023 2:12 PM
gy455xe emu rom func_04912 is where the ac break bug occurs
Avatar
cool
Avatar
so have you figured out what exactly is wrong yet?
Avatar
what ac break bug
Avatar
Where it shows "AC Break"
5:15 PM
But the real calc does not
5:15 PM
My bet is fucky keyboard handling tbh
Avatar
this is already a very well known problem
5:17 PM
even users emu has it
Avatar
Avatar
The Administrator
gy455xe emu rom func_04912 is where the ac break bug occurs
f_04912 is a function that checks for AC on emu roms
Avatar
Avatar
Steveyboi
f_04912 is a function that checks for AC on emu roms
The Administrator 10/19/2023 6:56 PM
i know
Avatar
it is also called in diagnostic which explains why it just goes to contrast immediately after the Pd- Read OK appears
Avatar
Avatar
Steveyboi
it is also called in diagnostic which explains why it just goes to contrast immediately after the Pd- Read OK appears
The Administrator 10/19/2023 6:56 PM
i also know
Avatar
alright
6:57 PM
so how can we fix
Avatar
The Administrator 10/19/2023 6:57 PM
the function calls another function that does some fucky stuff with sfrs that is somehow supposed to change the value of 08E00h
6:57 PM
idk how it works
Avatar
it calls delay...
7:00 PM
huh it sets 8E00H to 2
7:04 PM
hmm setting 8E00H to 2 on the official emulator freezes it until you press ON
7:04 PM
it... seems to get ANDed with 1?
7:05 PM
i set it to 2 and the new value is 0
Avatar
Avatar
Steveyboi
hmm setting 8E00H to 2 on the official emulator freezes it until you press ON
does ac do something?
Avatar
ya it goes to contrast like normal...
Avatar
no i mean if you do the write
Avatar
no it doesn't
Avatar
also im writing my own awful emulator frontend so thats fun (edited)
7:14 PM
could it be that ac delivers an nmi or something
7:14 PM
idk
Avatar
no it can't (edited)
7:15 PM
it is mapped to KI/KO
Avatar
these two arent mutually exclusive
Avatar
let's see if i can RE the sim to see what it does with that 8E00H byte
7:17 PM
delta uses it as a ready flag
7:17 PM
(since he did write a part of my frontend)
Avatar
ok very cool my totally original braille drawing code is correct enough
Avatar
bros using a terminal? laaaaame
Avatar
shush or ill bolt on a wayland client (custom) (edited)
7:20 PM
how does ki/ko work?
7:20 PM
write_mem_data(&ctx->core, 0, 0x8e01, 1, keys[i].ki); write_mem_data(&ctx->core, 0, 0x8e02, 1, keys[i].ko); this is rather... unsatisfying
7:20 PM
so you just write magic ki+ko to the magic place?
7:21 PM
i should pin it
Avatar
this doesnt match the u8emu code tho
Avatar
because that implementation is for the emulator keyboard
7:23 PM
oh so the emu does pv?
7:23 PM
thats cool ig
7:23 PM
wait couldnt you do fast two way comms via ki/ko as gpios
Avatar
uhhhhhhhh
7:24 PM
🤷
Avatar
hmm okay
7:24 PM
anyway
7:24 PM
so calculator does weird pv tricks got it
Avatar
oh god the Execute function is long as hell
8:00 PM
thankfully it's not as long as the ROM writing function
8:00 PM
so ghidra can actually decompile it
Avatar
my emulator is so good
8:01 PM
man i should do sixels
Avatar
clear screen?
Avatar
Avatar
Steveyboi
clear screen?
i could
8:01 PM
but nah
8:01 PM
no point
8:02 PM
ill implement waiting for the target to settle and restoring from that checkpoint to get to the input phase quicker
Avatar
so. first things first i need to find where the function reads PC and CSR
8:04 PM
should be ez
8:10 PM
well actually not
Avatar
most quality emulator
Avatar
indeed
8:23 PM
also you're only aiming for fx-83GT+ like delta?
8:23 PM
lame
Avatar
well no
8:23 PM
i might adapt my frontend
8:23 PM
shouldnt be too bad
8:23 PM
and anyway i want to write a fuzzer
8:23 PM
like thats my goal
8:23 PM
so idk might not make sense to do any fancy multicalc support
Avatar
multicalc support is the best
Avatar
Avatar
Steveyboi
multicalc support is the best
is it hard?
Avatar
no
Avatar
i was thinking of making my own entire emu to get more them speedz
8:24 PM
like optimize it for speed and like play jit games etc
Avatar
GammaVelorum 10/19/2023 8:24 PM
is that i3wm
Avatar
Avatar
GammaVelorum
is that i3wm
sway
Avatar
GammaVelorum 10/19/2023 8:24 PM
based
Avatar
sway ftw
Avatar
Avatar
pitust
i was thinking of making my own entire emu to get more them speedz
if you're gonna make that, make sure to seperate frontend and core, since i'm gonna make a frontend of it :)
Avatar
Avatar
Steveyboi
if you're gonna make that, make sure to seperate frontend and core, since i'm gonna make a frontend of it :)
i will make sure that it involves megabytes of c++ and involves low level asm tricks
Avatar
eww c++
Avatar
and anyway the perf bottleneck in your emu is the horribly slow python code
8:26 PM
not the very fast emu core
Avatar
no way i'm gonna switch to C
Avatar
switch to c++ then
8:26 PM
lol
Avatar
GammaVelorum 10/19/2023 8:26 PM
go
Avatar
go to c ffi is slow as hell afaik
Avatar
Avatar
Steveyboi
no way i'm gonna switch to C
*or any other language other than python
Avatar
GammaVelorum 10/19/2023 8:27 PM
i mean he doesnt want a language thats difficult as hell
Avatar
i want a language thats like c++
Avatar
yup
Avatar
or optionally c++ with modules
8:27 PM
or d
8:27 PM
or go
8:27 PM
go is nice
Avatar
so how should i optimize my python code
8:28 PM
no switching langs
Avatar
GammaVelorum 10/19/2023 8:28 PM
was about to say riir
Avatar
Avatar
Steveyboi
so how should i optimize my python code
i suggest calling step five times in a tight loop
8:28 PM
rust = bad
Avatar
bruh boxy uses rust
Avatar
Avatar
pitust
i suggest calling step five times in a tight loop
then doing all the slow python stuff
Avatar
Avatar
Steveyboi
so how should i optimize my python code
GammaVelorum 10/19/2023 8:28 PM
you kinda dont honestly no pain no gain
Avatar
i dont want fearless concurrency i want to fear that my compiler will optimize my stores out
8:29 PM
and have my loads reorder themselves to be fast at the cost of all code breaking
Avatar
Avatar
pitust
i suggest calling step five times in a tight loop
what about the keyboard and the timer and the stop mode
8:30 PM
anyways i'm bad at RE
8:30 PM
so gave up
Avatar
the 8E00H = 2 will still be a mystery
Avatar
my re tools dont work ever since i switched to full time linux
Avatar
Avatar
pitust
like optimize it for speed and like play jit games etc
Good luck with that
Avatar
mir isnt that hard
Avatar
Maybe compile it into x86-64 asm or something
8:31 PM
shouldn't be hard
Avatar
i was going to do mir or c (edited)
8:31 PM
i want to be crossplatform because i have an arm
Avatar
oops wrong post
8:31 PM
frick
Avatar
Avatar
pitust
i want to be crossplatform because i have an arm
Oh well
Avatar
eh maybe later
Avatar
GammaVelorum 10/19/2023 8:33 PM
wait did stevey really make a pygame frontend
Avatar
yes
Avatar
its python
Avatar
pygame + tkinter
Avatar
and pygame
8:33 PM
and its horrible
8:33 PM
and sucks
Avatar
GammaVelorum 10/19/2023 8:33 PM
of all things to use omg
Avatar
nooooooo frick
Avatar
like fr at least use pyqt5
Avatar
hell naw i'm gonna switch to C
Avatar
Avatar
pitust
like fr at least use pyqt5
i learned tk
8:34 PM
🤷
Avatar
tk is like the slowest thing ever you know that right
Avatar
no
Avatar
it calls out to tcl in a subprocess
8:34 PM
afaik
8:34 PM
so you have a scripting engine in your scripting engine
Avatar
GammaVelorum 10/19/2023 8:34 PM
i mean you can make pygame fast but it means you write 90% c
Avatar
the benefit of c is gone if you spend 1% of time in c and 99% of time checking numbers in python
Avatar
and i said multiple times no switching langs
Avatar
anyway time to instrument the emulator
Avatar
Avatar
Steveyboi
and i said multiple times no switching langs
GammaVelorum 10/19/2023 8:35 PM
oh well then 10fps it is
Avatar
i get 10fps as well lol
Avatar
I'm gonna port my emulator to TI-Z80 so if I do JIT thing I will compile it into Z80 code
Avatar
i'm sorry but its ~30 fps for me
Avatar
itd probably be full 60 on my nonpotato
8:36 PM
assuming arch linux arm has pygame and tkinter in the repos
Avatar
also the fps displayed is the pygame fps
Avatar
GammaVelorum 10/19/2023 8:36 PM
there was once i made a pygame game it ran at 24fps on potato
Avatar
Avatar
Steveyboi
also the fps displayed is the pygame fps
not the core's
8:36 PM
btw
8:36 PM
you should repaint on input ready (edited)
Avatar
the core's one is the instructions per second
Avatar
so you get nice frames (edited)
Avatar
GammaVelorum 10/19/2023 8:37 PM
and then i made a love2d game and it went to 50fps
Avatar
Avatar
pitust
you should repaint on input ready (edited)
yeah i use lru_cache for the screen byte grabbing function
Avatar
no no like
8:37 PM
dont touch the display
8:37 PM
until the emu reads from kbd
8:37 PM
then read the display into a backup buffer
Avatar
...i thought you have to draw on like every frame?
Avatar
Avatar
GammaVelorum
and then i made a love2d game and it went to 50fps
GammaVelorum 10/19/2023 8:38 PM
the reason why was because i was using a python pathfinding library if not its easily 60fps
Avatar
Avatar
Steveyboi
...i thought you have to draw on like every frame?
well yes but how do you tell where the frame boundaries lie
8:38 PM
without getting horrible tearing
Avatar
Avatar
Steveyboi
...i thought you have to draw on like every frame?
GammaVelorum 10/19/2023 8:38 PM
no you just skip the whole draw loop until the screen changes
Avatar
gotta go for 15 mins
Avatar
until the change is finished*
Avatar
GammaVelorum 10/19/2023 8:38 PM
the screen only empties when u tell it to right
Avatar
Avatar
Steveyboi
gotta go for 15 mins
brb
Avatar
GammaVelorum 10/19/2023 8:42 PM
honestly why is tkinter needed youre making a clickable calculator screen
Avatar
zsh: segmentation fault (core dumped) LD_LIBRARY_PATH=. ./wwce
grr
8:54 PM
on u8 calls are bl right?
8:54 PM
oh wait there is pop pc
8:56 PM
pop lr is the only way to set lr, huh
8:57 PM
well theres bl too ig (edited)
8:57 PM
so now i fall out of sync
Avatar
Avatar
pitust
on u8 calls are bl right?
Yes
Avatar
what is it
8:59 PM
?
Avatar
B is jump, BL is call(like on ARM which sets LR)
Avatar
what is problem
Avatar
so like
Avatar
push lr is a way to backup LR for nested calls
Avatar
i decided to build a call stack
9:00 PM
so that i can detect rop
Avatar
so x86 calls look like bl xxxx \...\ xxxx: push lr
Avatar
yeah okay cool
9:00 PM
i know how x86 and arm calls work
Avatar
and pop pc is... ret
Avatar
read the u8 manual
Avatar
call => 98ae ret => c5ae bad return going to c5ae but lr = 98ae
9:01 PM
the confusion is this weirdness
9:01 PM
98ae
9:01 PM
returns to c5ae
Avatar
Avatar
ArNeKJ
and pop pc is... ret
not really, it's for returning from a function that calls another function
9:01 PM
well yeah whatever
Avatar
there is another instruction rt
9:01 PM
which is just like bx lr
9:02 PM
so question wtf is 98ae
Avatar
what rom
9:02 PM
98ae is an address
Avatar
emu fx83gt+ ig
Avatar
Avatar
Steveyboi
98ae is an address
no shit
Avatar
also you should also print LCSR
Avatar
whats lcsr
Avatar
CSR version of LR basically
9:03 PM
but why
9:03 PM
CSR:PC=LCSR:LR ig
Avatar
yup
Avatar
wow the disasm is so slow
9:05 PM
try printing less
Avatar
the problem is with the decoding
9:05 PM
and without the printing i won't know the progress of the disasm
9:06 PM
should update it so doesn't print to stdout
9:06 PM
(i was trying to copy delta's disasm)
Avatar
no like print every 16 pc values
9:06 PM
lol
9:07 PM
its visibly faster
Avatar
also the label detection isn't entirely perfect
Avatar
ah yeah who cares
Avatar
finding all the functions yourself is gonna take time....
9:10 PM
that's why i added function detection and labels
Avatar
oh boy
Avatar
also should remove the use of globals
Avatar
least fucked up disasm
9:13 PM
or well not disasm ig
9:13 PM
pop pc?
9:13 PM
wtf?
Avatar
yes
9:13 PM
pop pc
9:13 PM
normal
Avatar
with no push lr?
9:13 PM
this is an indirect branch thunk i guess
9:13 PM
ohh
9:13 PM
wow
9:14 PM
thats so ugly
Avatar
user dubs it far_call_stub
9:14 PM
used to call functions from jump tables, i think
Avatar
Avatar
Steveyboi
not really, it's for returning from a function that calls another function
I was saying x86 ret 💀
Avatar
ok
9:14 PM
(but idk a lot of x86 assembly) (edited)
Avatar
You know some architectures use stacks to store return addresses
9:15 PM
like m68k and Z80 and x86 and stuffs
Avatar
wait what no
9:15 PM
that doesnt work
Avatar
yeah the pop pc pops PC from stack
Avatar
push lr push er8 mov er8, er0 ;;void y(x z) { z(); z(); } bl er0 bl er8 pop er8 pop pc end
9:15 PM
this is valid asm
9:15 PM
so like
9:15 PM
wtf
Avatar
yup
9:15 PM
valid
Avatar
Avatar
Steveyboi
user dubs it far_call_stub
indirect branch trampoline :^)
9:16 PM
ok but why then
Avatar
idk
Avatar
no like why
Avatar
jump tables I guess
Avatar
yeah jump tables
Avatar
yeah but you dont need it
Avatar
idk
9:17 PM
lapis's compiler
Avatar
well i know its for indirect branches (edited)
Avatar
You do need them for calculations
Avatar
Avatar
Steveyboi
lapis's compiler
but ccu8 handles this
Avatar
Avatar
pitust
push lr push er8 mov er8, er0 ;;void y(x z) { z(); z(); } bl er0 bl er8 pop er8 pop pc end
no you can branch to register like this?
Avatar
yes
Avatar
theres no way a thunk is better
9:18 PM
okay whatever
9:18 PM
quality compiler
9:19 PM
ffs
Avatar
cleaning it up rn
Avatar
Avatar
pitust
quality compiler
Indeed
Avatar
gonna clean it up
Avatar
void instr_bl(struct u8_core *core, uint8_t flags, struct u8_oper *op0, struct u8_oper *op1) { core->regs.lcsr = core->regs.csr; core->regs.lr = core->regs.pc; core->regs.csr = oper_read(core, op0); core->regs.pc = op1->addr; core->wwce_call(core->regs.lr); if (read_mem_code(core, core->regs.csr, core->regs.pc, 2) == 0xF28E) { core->wwce_call(read_mem_data(core, core->cur_dsr, core->regs.sp, 2)); } }
9:24 PM
most quality code
Avatar
ehhh it's... ok
Avatar
im talking about my patch
9:25 PM
:^)
9:26 PM
anyway cool
9:28 PM
my stack trace accouting thing works
9:28 PM
so thats nice
Avatar
i may make my own call stack feature in my frontend
Avatar
its not super hard
9:28 PM
so
9:29 PM
also i dont handle lcsr
9:29 PM
so ig thats that
9:30 PM
hmm how do i deal with lcsr
Avatar
easy just print it
9:30 PM
include it in the call stack data or sth
Avatar
void wwce_gather_feedback(uint16_t pc, uint16_t csr, bool btaken) { uint32_t realpc = uint32_t(pc) | (uint32_t(csr) << 16); printf("%05x => %s\n", realpc, btaken ? "taken" : "not taken"); } quality code
Avatar
you modifying delta's core?
Avatar
cool
Avatar
im instrumenting it
9:33 PM
because i want to gather coverage feedback (edited)
9:33 PM
its a couple small changes
Avatar
maybe in the future i'll switch to your mod core
Avatar
nah no point
9:33 PM
my core just adds 3 callbacks
9:33 PM
which is just call tracking + branch tracking
9:34 PM
"core"
9:34 PM
okay how do i measure how "interesting" some branch is (edited)
Avatar
idk
Avatar
i mean i could sort branches by heat and then assign scores that way?
9:37 PM
but like
9:37 PM
idk
9:37 PM
i dont want to go through all of them because thats sloooow
9:38 PM
i mean theres only 5kish branches
Avatar
Avatar
pitust
void wwce_gather_feedback(uint16_t pc, uint16_t csr, bool btaken) { uint32_t realpc = uint32_t(pc) | (uint32_t(csr) << 16); printf("%05x => %s\n", realpc, btaken ? "taken" : "not taken"); } quality code
Where is that called?
Avatar
case 0b0000: { // BGE if (!(c == 0)) { BNT(); return; } break; } repeat for every branch
Avatar
oh my
Avatar
and i do BT() when its taken
Avatar
#define BNT() core->wwce_gather_feedback(core->regs.pc, core->regs.csr, false); #define BT() core->wwce_gather_feedback(core->regs.pc, core->regs.csr, true);
Avatar
Remember that the PC you get in the handlers is the PC of the next instruction
9:41 PM
Not the PC of the current instruction (edited)
Avatar
oh yeah hm
9:41 PM
okay
9:41 PM
thats fine
9:41 PM
it uniquely identifies them
9:41 PM
so thats fine
Avatar
Yes, just mentioning it as that threw me a bit at first when debugging
9:42 PM
It wasn't intentional but requires more work to show the current instructions PC
9:42 PM
So I didn't
Avatar
whatever
9:43 PM
yeah thats fine
Avatar
zsh: segmentation fault (core dumped) LD_LIBRARY_PATH=. ./wwce
quality code
Avatar
:)
Avatar
ok this is too slow
9:58 PM
lets build with -Ofast
9:58 PM
much better
Avatar
@Steveyboi I fixed the CMPC and SUBC bugs I think
10:02 PM
the CW ROM might works now
10:02 PM
I know I keep saying it, but I'll try to dedicate more time
10:02 PM
I just have work, been very sick, got a bf now so relationship stuff, sports, etc etc
10:03 PM
I need to get better at time management
Avatar
oh boy, cursor is still missing, 1+1=0, yada yada
Avatar
well shit
10:04 PM
more bugs
Avatar
ehhh a great shot
10:05 PM
does lineio still exist on the newer models?
10:05 PM
check that
10:05 PM
sometimes it works more
Avatar
Avatar
Delta
does lineio still exist on the newer models?
yes still exists, well i'll check that
10:07 PM
Avatar
is that where the 0 is meant to be either?
10:09 PM
(again, know nothing about newer calcs)
Avatar
yup
10:10 PM
they turned lineio into a sort of multiline mode
Avatar
... huh
10:11 PM
yeah I'll pass
Avatar
there, i cleaned up my disassembler
10:21 PM
i'll update my frontend tomorrow to support the new version
Avatar
okay so i tried writing a coverage-guided fuzzer to try to find bugs
11:58 PM
doesnt seem to be doing much tho
12:02 AM
okay i think my code is broken it decided 1 1 1 1 1 1 1 &[KI4 KO0] [sin] [RCL] [x^n] &[KI2 KO0] 0 &[KI4 KO0] 1 &[KI2 KO0] = [DEL] [sin] [DEL] causes an error (edited)
Avatar
How are you detecting errors?
Avatar
Avatar
Delta
How are you detecting errors?
shadow stack
12:06 AM
1 1 1 1 1 1 1 &[KI4 KO0] [sin] [RCL] [x^n] &[KI2 KO0] 0 &[KI4 KO0] 1 &[KI2 KO0] = here is another input
12:06 AM
from different run btw
Avatar
If you're trying to detect errors in my implementation then you need an oracle no?
Avatar
Avatar
Delta
If you're trying to detect errors in my implementation then you need an oracle no?
im trying to look for calc bugs tho
Avatar
What is it being compared to
Avatar
Avatar
Delta
What is it being compared to
nothing
12:08 AM
im assuming that if you return to the wrong place something went wrong™️
12:10 AM
hmm
12:10 AM
what is 77ae
Avatar
Ooooooh
Avatar
77aah contains a bl
12:11 AM
to 17b1e
Avatar
I thought you were fuzzing my codr
12:11 AM
Not the calcs
12:11 AM
Ok
Avatar
no no im fuzzing the calc
12:12 AM
alr f_17B1E: 1:7B1EH F8CE PUSH LR 1:7B20H 90108000 L R0, 8000H 1:7B24H 8100 MOV R1, R0 1:7B26H 200F AND R0, #0FH 1:7B28H 914C SRL R1, 4 1:7B2AH 020A MOV R2, #0AH 1:7B2CH 8208 SUB R2, R0 1:7B2EH 9310800D L R3, 800DH 1:7B32H 2302 AND R3, #02H 1:7B34H C81F BNE .l_056 1:7B36H 7108 CMP R1, #08H 1:7B38H C108 BLT .l_02C 1:7B3AH C803 BNE .l_024 1:7B3CH 120A ADD R2, #0AH 1:7B3EH 7002 CMP R0, #02H 1:7B40H C104 BLT .l_02C .l_024: 1:7B42H 9310800E L R3, 800EH 1:7B46H 7300 CMP R3, #00H 1:7B48H C901 BEQ .l_02E .l_02C: 1:7B4AH 0200 MOV R2, #00H .l_02E: 1:7B4CH 9310800D L R3, 800DH 1:7B50H 7302 CMP R3, #02H 1:7B52H C103 BLT .l_03C 1:7B54H C804 BNE .l_040 1:7B56H 8221 ADD R2, R2 1:7B58H CE0A BAL .l_050 .l_03C: 1:7B5AH 1201 ADD R2, #01H 1:7B5CH CE08 BAL .l_050 .l_040: 1:7B5EH 730A CMP R3, #0AH 1:7B60H C103 BLT .l_04A 1:7B62H F1017BB4 BL f_17BB4 1:7B66H CE02 BAL .l_04E .l_04A: 1:7B68H F1017B7E BL f_17B7E .l_04E: 1:7B6CH 0200 MOV R2, #00H .l_050: 1:7B6EH 9211800F ST R2, 800FH 1:7B72H F28E POP PC .l_056: 1:7B74H 7109 CMP R1, #09H 1:7B76H C1E9 BLT .l_02C 1:7B78H 7001 CMP R0, #01H 1:7B7AH C1E7 BLT .l_02C 1:7B7CH CEE2 BAL .l_024
12:12 AM
what does this do
Avatar
Let me read when back in my room
Avatar
time to re
12:13 AM
L is mem load right?
Avatar
The low 8000h addresses are what user termed "regs"
12:13 AM
That's where the code stores numbers while working on them
Avatar
Avatar
pitust
L is mem load right?
Yes
12:14 AM
cool cool
12:14 AM
so math stuff ig
12:14 AM
Probably not too interesting
Avatar
i mean this sounds like a possible emu error?
Avatar
How are you entering KI and KO directly?
Avatar
vm.write(0x8e01, ki); vm.write(0x8e02, ko);
12:15 AM
like this
12:15 AM
What do you see happen when that gets entered?
12:15 AM
reset?
Avatar
It aborts on bad return?
12:16 AM
What if you allow it to keep going
12:16 AM
oh no so
12:17 AM
this is the end of the trace
12:17 AM
it asks me for input at this ss
12:17 AM
its not a u8_reset tho
12:17 AM
i added a printf there and it doesnt trip
Avatar
Ok so the bad address could just be how the jump table does fucky shit
12:18 AM
So the emu just crashes or?
Avatar
no no the emu is fine
Avatar
I don't get how it aborts?
Avatar
"abort" as in
12:18 AM
something bad happened
12:18 AM
i exit(1) at the end of a trace that errors this way (edited)
Avatar
What is the bad in this case then
Avatar
the lr on the shadow stack doesnt match lr it goes to
Avatar
That could just be fucky jump table shit
Avatar
hmm yea
12:20 AM
1 1 1 3 &[KI8 KO0] [tan] 7 &[KI4 KO0] ) &[KI0 KO0] 3 &[KI4 KO0] [hyp] = 3 [log_x] &[KI0 KO0] = same "failure" mode different input
12:20 AM
syntax error
12:20 AM
hmm yea
12:21 AM
but wtf
12:21 AM
7b66 is a valid ret target
Avatar
Avatar
pitust
the lr on the shadow stack doesnt match lr it goes to
The push-ed lr doesn't match the pop-ed pc?
12:23 AM
wtf is this function (7bb4)
12:23 AM
casually push lr
12:23 AM
then just dont do anything
Avatar
It's adding some kind of offset to the value at 8010h
Avatar
more about the fact it pushes
12:24 AM
then doesnt pop
12:24 AM
ever
Avatar
Unless RT is actually POP PC?
Avatar
rt is instr_rt
12:25 AM
void instr_rt(struct u8_core *core, uint8_t flags, struct u8_oper *op0, struct u8_oper *op1) { core->wwce_return(core->regs.lr); core->regs.csr = core->regs.lcsr; core->regs.pc = core->regs.lr; }
12:25 AM
nope
12:26 AM
something is wrong
Avatar
Is the PUSH LR actually PUSH LR then?
12:27 AM
The code works
12:27 AM
And that would royally fuck it up
12:29 AM
i should log every instruction that is executed
12:30 AM
Done that
12:30 AM
Generates huuuge logs
Avatar
too big to read by hand? (edited)
Avatar
If you know where to look, then no
12:31 AM
But I was only looking at tail end
12:31 AM
Submode zero stuff
Avatar
well it cant be more than a couple k instructions
12:31 AM
for the last subroutine
12:32 AM
the one that fails
12:34 AM
ok okay so
12:34 AM
i looked at the logs again
12:35 AM
this does not look right
12:35 AM
like at all
12:35 AM
it turns from 28tan(3111 (edited)
12:36 AM
into sqrt(sqrt(square)) - log(4M+ (edited)
12:36 AM
wtf
Avatar
What rom are you fuzzing?
Avatar
fx83gt+
12:37 AM
ok huh wtf
12:37 AM
this is ultra sketch
12:37 AM
[cos] 1 [M+] (edited)
12:37 AM
shows the mode menu?
Avatar
Like when you do it manually???
12:38 AM
only in the fuzzer
12:38 AM
wtff
12:38 AM
memory corruption?
Avatar
Avatar
pitust
memory corruption?
I mean, what else can it be?
Avatar
this is so slow
12:39 AM
like ungodly levels of slow
Avatar
Huh, for me it's actually faster than the real calc
Avatar
probably because i build with sanitizers
12:40 AM
Yeah no fuck the memory
12:41 AM
Sanitisers are for pussys
Avatar
u8core/core/instr.c:271:15: runtime error: left shift of negative value -1 u8core/core/instr_impl.c:232:16: runtime error: shift exponent 18446744073709551615 is too large for 64-bit type 'long unsigned int'
12:41 AM
bug btw (edited)
12:41 AM
ubsan no like
Avatar
Oh that
12:41 AM
Yeah I should probably mask it properly
Avatar
no asan errors
Avatar
That's good
12:42 AM
i dont know what happens
12:43 AM
but surely nothing good
12:44 AM
call stack: 9712 98ae c7e2 45a6 4538 3a3a 3930 8f40 6e88 7896
12:44 AM
no csr because csr values are for pussys as well
12:44 AM
no asan crashes
12:45 AM
1 1 1 1 1 1 1 1 1 1 1 [M+] &[KI8 KO0] [cos] 1 [cos] [(-)] 1 [M+] another failing input
12:46 AM
they all have one thing in common
12:46 AM
they end with M+
12:46 AM
and are all of the form <trig> <something> M+ (edited)
12:46 AM
1 1 1 1 . [cos] [DEL] [M+] [cos] 6 [M+]
12:48 AM
yepp
12:49 AM
another case
12:49 AM
literally identical
12:49 AM
anstan(1/ansans M+
12:49 AM
eats everything to ans
12:50 AM
So why is M+ fucked
Avatar
no clue
12:50 AM
hmm am i feeding inputs too fast
Avatar
Possibly
Avatar
c++ uint8_t ready = vm.read(0x8e00); if (readyp < ready) { if (ckey == numkeys) { if (doexit) { vm.paint(); exit(1); } printf("\x1b[H\x1b[2J\x1b[3J"); vm.paint(); return; // keys drained } uint8_t kc = keys[ckey++]; uint8_t ki = 1 << (kc >> 4); uint8_t ko = 1 << (kc & 0xf); vm.write(0x8e01, ki); vm.write(0x8e02, ko); } readyp = ready;
12:50 AM
this is what i do
Avatar
1 1 1 1 [cos] 4 9 [M+] turns into 9 sqrt sqrt
Avatar
Look at my implementation
12:51 AM
You have to wait for it to ask for the input
Avatar
is it too fast?
Avatar
Avatar
Delta
You have to wait for it to ask for the input
yea, readyp < ready
Avatar
so readyp = 0 ready = 1 means i feed it input
Avatar
If you're done keys
12:52 AM
Then reset KI and KO
12:52 AM
wdym reset ki and ko
Avatar
Like don't leave them set
Avatar
oh but like
12:53 AM
when im done with keys
12:53 AM
i go fuzz something else
12:53 AM
the vm is gone
12:53 AM
replaced with a brand new one copied straight from the master vm (edited)
Avatar
You have to give it some time
Avatar
well yeah i mean it sets ready = 0
12:54 AM
does the processing
12:54 AM
and ready = 1
12:54 AM
no?
12:54 AM
thats what i assumed it did
12:54 AM
i thought that ready = 1 means i want more input please
Avatar
If you're exiting as soon as keys are entered, then how will you know if they had an effect?
12:54 AM
That's what I mean
Avatar
Avatar
Delta
If you're exiting as soon as keys are entered, then how will you know if they had an effect?
no i exit when they ask for another key
12:55 AM
so if they ask for a key and no keys are left then im done (edited)
12:55 AM
next sample
Avatar
Ooooooh
12:55 AM
Ok I get it now
12:55 AM
How are you copying the master vm?
Avatar
c++ struct VM { uint8_t ram[0xe00]; uint8_t kbd[0x30]; uint8_t sfr[0x1000]; u8_core c; u8_mem_reg r[7] { data(0x8000, 0xE00, mem(ram)), data(0x8e00, 0x30, mem(kbd)), data(0xf000, 0x1000, mem(sfr)), text(0, 0x8000, mem(code)), code(0x8000, 0x8000, mem(code + 0x8000)), text(0x10000, 0x10000, mem(code + 0x10000)), rodata(0x80000, 0x10000, mem(code)), }; VM() { memset(ram, 0, sizeof(ram)); memset(kbd, 0, sizeof(kbd)); memset(sfr, 0, sizeof(sfr)); c.mem.num_regions = 7; c.mem.regions = r; c.wwce_call = wwce_call; c.wwce_return = wwce_return; c.wwce_gather_feedback = wwce_gather_feedback; u8_reset(&c); } VM(VM& other) : c{other.c} { r[0] = data(0x8000, 0xE00, mem(ram)); r[1] = data(0x8e00, 0x30, mem(kbd)); r[2] = data(0xf000, 0x1000, mem(sfr)); memcpy(ram, other.ram, sizeof(ram)); memcpy(kbd, other.kbd, sizeof(kbd)); memcpy(sfr, other.sfr, sizeof(sfr)); c.wwce_call = wwce_call; c.wwce_return = wwce_return; c.wwce_gather_feedback = wwce_gather_feedback; c.mem.regions = r; } uint8_t read(uint32_t addr) { return read_mem_data(&c, 0, addr, 1); } void write(uint32_t addr, uint8_t val) { write_mem_data(&c, 0, addr, 1, val); } void next() { u8_step(&c); } void paint() { render(&c); } };
12:57 AM
so i copy the u8_core, copy all the callbacks and reset regions to the correct list (edited)
12:57 AM
hmm wait
12:57 AM
i dont set all the other regions (edited)
12:57 AM
wtf
12:57 AM
oh
12:57 AM
this is fine
1:00 AM
hmm i should make my own shitty git host
Avatar
Why are you doing memcpy ram?
Avatar
Avatar
Delta
Why are you doing memcpy ram?
to make a duplicate
Avatar
Avatar
pitust
hmm i should make my own shitty git host
for all the sketchy u8 stuff
1:00 AM
(sketchy = probably not okay on gh)
Avatar
If you're doing a reset then RAM and the SFRs should all be reset too
Avatar
Avatar
Delta
If you're doing a reset then RAM and the SFRs should all be reset too
im not doing a reset
1:01 AM
im copying a configured instance (edited)
1:01 AM
so i dont have to wait one startup per run (edited)
1:01 AM
because startup takes approximately one forever
1:03 AM
Hmmm, then what could be fucked?
Avatar
i have no idea
Avatar
That all looks reasonable
1:06 AM
Can you show me the data text rodata stuff?
Avatar
git clone https://u8.malwarez.xyz/git/wwce
1:07 AM
@Delta
1:08 AM
most quality git hosting
1:08 AM
at pitust "manually scp git repo to the server" hosting
Avatar
On mobile eating food, will not be back in my room for a few hours
Avatar
ok sure
1:08 AM
#define mem(addr) .acc = U8_MACC_ARR, .array = addr, #define text(addr, len, acc) u8_mem_reg{.type = U8_REGION_BOTH, .rw = false, .addr_l = addr, .addr_h = addr + len - 1, acc} #define code(addr, len, acc) u8_mem_reg{.type = U8_REGION_CODE, .rw = false, .addr_l = addr, .addr_h = addr + len - 1, acc} #define rodata(addr, len, acc) u8_mem_reg{.type = U8_REGION_DATA, .rw = false, .addr_l = addr, .addr_h = addr + len - 1, acc} #define data(addr, len, acc) u8_mem_reg{.type = U8_REGION_DATA, .rw = true, .addr_l = addr, .addr_h = addr + len - 1, acc}
1:08 AM
light macros
Avatar
All correct
Avatar
okay this happens even if i do memset(vm.ram, 0, sizeof(vm.ram)); memset(vm.kbd, 0, sizeof(vm.kbd)); memset(vm.sfr, 0, sizeof(vm.sfr)); u8_reset(&vm.c);
1:11 AM
before every iteration
1:11 AM
but a different setup this time: [Left] [tan] 1 1 =
1:13 AM
see coverage guided fuzzing works great at finding bugs! (edited)
1:17 AM
hang
1:17 AM
i got a hang!
1:17 AM
hmm
1:17 AM
maybe my code is bugged?
1:17 AM
yea
1:17 AM
ig
1:22 AM
hm race
1:22 AM
i gave the emu 100 cycles (edited)
1:23 AM
oh no nvm
1:23 AM
just unlucky
1:26 AM
hmm yea maybe a race condition?
Avatar
9712 98ae c7e2 45a6 4538 3a3a 3930 366c 8f3a 6dc8 77ae calltrace note
1:54 AM
77ae is after a call to 7b1e (edited)
1:55 AM
7b66 is after 7bb4
1:58 AM
oh wtf
1:58 AM
this code is ultra broken
1:59 AM
bl f_17bb4 r2 = 0 [0x800f] = r2 pop pc
1:59 AM
and bb4 pushes lr
1:59 AM
so this is an infinite loop?
1:59 AM
wtff
1:59 AM
this makes no sense
2:03 AM
i dont get it
2:03 AM
wtf is happening here
2:07 AM
is there some other u8 disassembler apart from pyu8disas?
Avatar
okay well there is dasm8 now
3:18 AM
(custom)
3:18 AM
(new)
3:19 AM
(very shit)
3:19 AM
(disassembler based on emu tables so should™️ be correct)
Avatar
okay wtf
4:32 AM
my emu is a lot more happy if i use the magic keyboard seq manually
4:32 AM
as in no super weird things
4:34 AM
cool okay
4:34 AM
so i think what happens is that my emu hates running trig for some reason (edited)
Avatar
casual 206kloc asm trace
4:45 AM
ffs
4:46 AM
0x7bb4: push {lr} 0x7bb6: cmp r2, 0 0x7bb8: b.nv 0x7bbe 0x7bba: cmp r2, 0xb 0x7bbc: b.lt 0x7bc0 0x7bc0: add r2, 0xff 0x7bc2: mov er4, 0xa 0x7bc4: mul er4, r2 0x7bc6: mov r0, 0x48 0x7bc8: mov r1, 0x10 0x7bca: add er4, er0 0x7bcc: lea [er4] 0x7bce: ld qr0, [ea+] 0x7bd0: ld er8, [ea+] 0x7bd2: ld r0, [0x8010] 0x7bd6: lea [0x8010] 0x7bda: st qr0, [ea+] 0x7bdc: st er8, [ea+] 0x7bde: rt 0x7b66: b.nop 0x7b6c 0x7b6c: mov r2, 0 0x7b6e: st r2, [0x800f] 0x7b72: pop {pc}
4:46 AM
ah yep
4:46 AM
its totally doing double return
4:46 AM
fuunn
4:46 AM
this being intended is incredibly cursed
Avatar
i encountered half of the branches in the firmware so far in my fuzzer
4:55 AM
50.2%
Avatar
4600 branch outcomes (ie a minimum of 2300 branches seen)
Avatar
Avatar
pitust
is there some other u8 disassembler apart from pyu8disas?
there is the other u8 disassemblers section in the readme...
6:37 AM
there is also users disasm (but treats DSR prefix instructions as its own instruction)
6:37 AM
lapis also has a tool called DAU8, but it's not included in the build tools anymore
Avatar
Avatar
pitust
0x7bb4: push {lr} 0x7bb6: cmp r2, 0 0x7bb8: b.nv 0x7bbe 0x7bba: cmp r2, 0xb 0x7bbc: b.lt 0x7bc0 0x7bc0: add r2, 0xff 0x7bc2: mov er4, 0xa 0x7bc4: mul er4, r2 0x7bc6: mov r0, 0x48 0x7bc8: mov r1, 0x10 0x7bca: add er4, er0 0x7bcc: lea [er4] 0x7bce: ld qr0, [ea+] 0x7bd0: ld er8, [ea+] 0x7bd2: ld r0, [0x8010] 0x7bd6: lea [0x8010] 0x7bda: st qr0, [ea+] 0x7bdc: st er8, [ea+] 0x7bde: rt 0x7b66: b.nop 0x7b6c 0x7b6c: mov r2, 0 0x7b6e: st r2, [0x800f] 0x7b72: pop {pc}
this is when someone with almost no understanding of U8 writes a disassembly of U8 code
Avatar
ld lol, is that ARM mnemonic?
Avatar
Avatar
Steveyboi
this is when someone with almost no understanding of U8 writes a disassembly of U8 code
Well it's understandable
Avatar
Avatar
pitust
0x7bb4: push {lr} 0x7bb6: cmp r2, 0 0x7bb8: b.nv 0x7bbe 0x7bba: cmp r2, 0xb 0x7bbc: b.lt 0x7bc0 0x7bc0: add r2, 0xff 0x7bc2: mov er4, 0xa 0x7bc4: mul er4, r2 0x7bc6: mov r0, 0x48 0x7bc8: mov r1, 0x10 0x7bca: add er4, er0 0x7bcc: lea [er4] 0x7bce: ld qr0, [ea+] 0x7bd0: ld er8, [ea+] 0x7bd2: ld r0, [0x8010] 0x7bd6: lea [0x8010] 0x7bda: st qr0, [ea+] 0x7bdc: st er8, [ea+] 0x7bde: rt 0x7b66: b.nop 0x7b6c 0x7b6c: mov r2, 0 0x7b6e: st r2, [0x800f] 0x7b72: pop {pc}
wrong things:
  • code memory addresses missing the segment part
  • the push and pop instructions don't have brackets
  • wrong hex syntax (ie. 0x7bbe should be 7bbeh)
  • b.cond is wrong
  • ld should be l
  • Dadr is not wrapped in brackets
(edited)
Avatar
🤦‍♂️
8:49 AM
You're so good at being picky
8:51 AM
Different people prefer different syntaxes, the disassembly is not meant to be assembled later plus we don't have assembler yet
Avatar
My DAA/DAS implementation is wrong (edited)
Avatar
delta found out it was wrong already
10:29 AM
is this a new bug or did you not fix it yet
Avatar
Gosh can you stop talking like that
Avatar
Avatar
Steveyboi
delta found out it was wrong already
I know I added code to handle carry
Avatar
Avatar
Steveyboi
is this a new bug or did you not fix it yet
I think it's a new bug about HC flag
Avatar
oh also delta can you add cycle counts? (edited)
12:52 PM
(without it the timer won't be emulated correctly)
Avatar
Avatar
Steveyboi
wrong things:
  • code memory addresses missing the segment part
  • the push and pop instructions don't have brackets
  • wrong hex syntax (ie. 0x7bbe should be 7bbeh)
  • b.cond is wrong
  • ld should be l
  • Dadr is not wrapped in brackets
(edited)
well yes the pc doesnt have csr added
1:28 PM
because i dont have code for that cbf
1:28 PM
all the other things are on purpose
1:34 PM
i think 7bbeh is way less readable so
1:35 PM
and the dadr bracket thing is consistency
Avatar
i'm adding this to my frontend
11:16 AM
it doesn't work because i haven't added the actual code that changes the regs yet 🤣
11:17 AM
and obviously you need a textbox and OK button
Avatar
ok done
Avatar
Honestly I think it might be a better idea to add a command window
6:16 PM
Say you want to set a breakpoint, you just type b 0:1234
6:16 PM
Or such
Avatar
yeah that would be sweet
6:17 PM
vim vibes
Avatar
Yeah, something more akin to GDB
Avatar
maybe in the future i'll add another branch that uses CLI instead of tkinter
6:18 PM
the main branch will still use tk
6:19 PM
and only use pure pygame for the display and keyboard
Avatar
actually i should just add a built in terminal instead (edited)
Avatar
how do i emulate all the other roms?
9:19 PM
my assembler kinda works (but not really) but im somewhat bored
Avatar
Avatar
pitust
how do i emulate all the other roms?
change the memory configuration
9:23 PM
use my frontend has a reference
Avatar
oh just different mem+io?
9:23 PM
that sounds easy
Avatar
Everyone be like: writes an emulator in 2 days it's easy, I'm bored
11:01 PM
Me be like: been working on his slow emulator for months & cannot make it work
Avatar
well you have been a bit helpful
Avatar
I'd be happy if I were
Avatar
Avatar
ArNeKJ
Everyone be like: writes an emulator in 2 days it's easy, I'm bored
Do not let anyone tell you it is easy
11:04 PM
It is not
11:05 PM
And mine's still not fucking correct
Avatar
yup, still missing the cycle counts
Avatar
Guess we still need test ROMs
Avatar
Not even that
11:06 PM
I mean the CW just not working
Avatar
But whyy
Avatar
idk
Avatar
A test ROM will solve all the issues
Avatar
But do we have working assembler
Avatar
a partially working one tho
Avatar
No, I don't think we do
Avatar
mine has no support for *adr yet
11:08 PM
or Disp*
Avatar
"Mine" is not finished and I don't have time to learn fasmg syntaxes
Avatar
mine works for the most part
11:14 PM
except no labels
Avatar
mine no labels as well
11:14 PM
but integrating labels is like, an hour of work
Avatar
yeah i think it's hard
Avatar
local labels, namespaces, constants, code relocations
Avatar
yup
Avatar
oh yeah and relocs and friends
Avatar
I'm biased because I'm a fasmg user
11:15 PM
and it's a great assembler
11:16 PM
so all the features from fasmg are good features and I want them
11:16 PM
so plzzzzz add them
Avatar
MeowIce | fx-799VN/fx-880BTG 10/26/2023 8:01 PM
bitex has an emu for 880btg but they dont want to release it
Avatar
ya
8:02 PM
it is technically possible to mod the fx-92 Collège emu we have
8:02 PM
and turn it into fx-880BTG emulator
Avatar
MeowIce | fx-799VN/fx-880BTG 10/26/2023 8:03 PM
Avatar
ya saw that pic already
8:04 PM
also i'm pretty sure the "fx-ClassWiz Emulator" name is just a placeholder
Avatar
MeowIce | fx-799VN/fx-880BTG 10/26/2023 8:04 PM
=]
Avatar
Avatar
Steveyboi
it is technically possible to mod the fx-92 Collège emu we have
but there is one problem
8:05 PM
there is a function that calls WriteCodeMemory a bunch of times which actually writes the rom
Avatar
MeowIce | fx-799VN/fx-880BTG 10/26/2023 8:05 PM
write ?
Avatar
yes
8:05 PM
basically it writes to ROM
8:06 PM
so if we wanna change the rom we need to change those writecodememory calls
Avatar
MeowIce | fx-799VN/fx-880BTG 10/26/2023 8:06 PM
oo
Avatar
and every call writes like one byte at a time
8:06 PM
and a CWII rom is... big
Avatar
MeowIce | fx-799VN/fx-880BTG 10/26/2023 8:07 PM
yes
8:08 PM
because of their "đột phá công nghệ"
Avatar
lol
Avatar
ok i think i fixed the AC bug properly
9:32 PM
unfortunately the timer is too fast
9:32 PM
which is a problem
10:54 PM
all the WriteRom* functions call WriteCodeMemory
Avatar
(just pinging to remind you) @Delta when you're free can you add the cycle counts to your core? thanks
Avatar
actually do i need the cycle counts?
9:09 AM
its fcking stop mode
9:10 AM
maybe i'll increment the timer every n frames (n is a variable)
Avatar
YESSSSSS IT WORKS
10:55 AM
turns out the cycle counts didn't matter
10:56 AM
actually i should test out diagnostic now
Avatar
hmm after the change real keyboard doesn't work anymore
Avatar
ok i reverted the timer wait thing
11:48 AM
was basically a joke
Avatar
hmm looking in users emu emulating the timer correctly should be fairly easy
12:00 PM
actually no fck it
12:00 PM
its too darn complex (edited)
Avatar
how should i emulate the timer correctly now
Avatar
is that even needed
Avatar
yea
8:02 PM
timer runs too fast currently
8:03 PM
with my emu kb reimplementation that fixes AC, pressing a key requires multiple tries to get a hit
8:03 PM
ideally a keypress would be detected in stop mode
Avatar
so how tf so i emulate the timer correctly now
3:27 PM
iirc beucalc has a working implementation
3:27 PM
but too lazy to decompile this time
Avatar
hmm i just tested my AC break bugfix on fx-880BTG emu rom
5:16 PM
it... still fcks up
5:17 PM
and shows ac break in math box > dice roll
5:17 PM
CWII is truly on a new level
Avatar
Avatar
Steveyboi
it... still fcks up
ok so i didn't write code for classwiz and fx-82SOLAR II
6:28 PM
i did now
Avatar
meowcrocontroller 10/28/2023 6:38 PM
did you get classwiz working on your frontend?
Avatar
yes
6:39 PM
the emulator core allows for different memory configurations
Avatar
meowcrocontroller 10/28/2023 6:39 PM
i tried your latest commit and i get an out of range error about the status bar crops
Avatar
oh sorry i committed without realizing
6:39 PM
i'm fixing it rn
6:43 PM
there i fixed it, should work now
Avatar
So which roms do and don't work?
Avatar
all the pre-CWII roms work perfectly
6:44 PM
its the CWII roms that don't
Avatar
Hmmm ok
6:44 PM
I think I'll spend today trying to fix CW
Avatar
meowcrocontroller 10/28/2023 6:45 PM
hmm, classwizz stil doesn't run for me
6:45 PM
crop = config.status_bar_crops[i] IndexError: tuple index out of range
6:45 PM
this is what i get
Avatar
check the status bar crops
Avatar
meowcrocontroller 10/28/2023 6:45 PM
do i need some other status bar file?
Avatar
you need an image
6:46 PM
i didn't add much error handling
Avatar
And probably swich your frontend to use json, and accept it as an argument
6:46 PM
And package everything together
Avatar
meowcrocontroller 10/28/2023 6:46 PM
i am using the image from the 83gt plus package
Avatar
Like images roms and configs
Avatar
meowcrocontroller 10/28/2023 6:46 PM
(for the status bar)
6:47 PM
or maybe i'm using the wrong ROM? I'm using the one which Delta said it works (83gtx, in downloads)
Avatar
fx-83GT X?
Avatar
use this rom
Avatar
yea that's fx-83GT+ emu rom
Avatar
Uhhhh GTX?
6:49 PM
No?
6:49 PM
GT+
Avatar
meowcrocontroller 10/28/2023 6:49 PM
oh, i misread then
Avatar
Avatar
pitust
use this rom
this exact rom_emu.bin
Avatar
Avatar
meowcrocontroller
oh, i misread then
Ah ok, just there is big difference between them lol
Avatar
he's using my frontend
Avatar
meowcrocontroller 10/28/2023 6:50 PM
i know lol
Avatar
not delta's one
6:50 PM
for delta's one you need an ES+ emulator rom
Avatar
sure but using this exact rom will make things definitely work
Avatar
The curses stuff is a bit fucky on windows
Avatar
i should make a fast sdl frontend
Avatar
It's better to use steveboi's
Avatar
meowcrocontroller 10/28/2023 6:51 PM
but happy sheep posted a gtx rom
Avatar
the curses frontend doesn't even run properly with mingw64
Avatar
meowcrocontroller 10/28/2023 6:51 PM
cy213
Avatar
skill issue for having a broken os ig
Avatar
Avatar
meowcrocontroller
but happy sheep posted a gtx rom
256 KB
6:51 PM
there
6:51 PM
that's fx-83GT X emu rom
Avatar
Avatar
pitust
i should make a fast sdl frontend
i think ill do that after i finish my acme code (edited)
Avatar
Avatar
meowcrocontroller
crop = config.status_bar_crops[i] IndexError: tuple index out of range
meowcrocontroller 10/28/2023 6:52 PM
yyea, i still get this and the emulator hangs
Avatar
Avatar
pitust
i should make a fast sdl frontend
make sure to add multi calc support
Avatar
Avatar
Steveyboi
make sure to add multi calc support
yeah yeah
Avatar
Avatar
meowcrocontroller
yyea, i still get this and the emulator hangs
oh ik why
Avatar
okay cool acme works
6:53 PM
time to do all the cname tricks needed and deploy it
Avatar
you didn't change the status bar crops
Avatar
meowcrocontroller 10/28/2023 6:53 PM
i did not
Avatar
you need to set them up first
Avatar
meowcrocontroller 10/28/2023 6:54 PM
in config?
Avatar
yup
6:54 PM
sorry i didn't include preset CWI configs
Avatar
I think it's a good idea to create configs for all the roms
Avatar
Avatar
Steveyboi
sorry i didn't include preset CWI configs
meowcrocontroller 10/28/2023 6:54 PM
do you happen to have one ready to go?
Avatar
Package the image and rom binaries
6:55 PM
just like
6:55 PM
zip
6:55 PM
or something
Avatar
well then let me make a fx-83GT X package
6:55 PM
hang on
Avatar
so like rom+face+face metadata+emulation info+model
Avatar
I was thinking a github with lots of subdirs
6:57 PM
And have the emualtor in the root
Avatar
zips are easier to deal with
6:57 PM
one zip per calc
6:57 PM
idk
6:57 PM
Git is easier to maintain
6:58 PM
extract in root
6:58 PM
the window is big
6:58 PM
too lazy to change it
Avatar
Avatar
Delta
Git is easier to maintain
git repo, and generate zips off of the repo
6:58 PM
easy (edited)
Avatar
Avatar
Steveyboi
the window is big
its fine for me since i have 1440p screen
Avatar
Avatar
pitust
git repo, and generate zips off of the repo
That sounds like a good idea
Avatar
Avatar
Steveyboi
here
python main.py configs.config_fx83gtx_emu to run
6:59 PM
also i should make the register display a seperate window
7:00 PM
so i can make classwiz 1x size windows
7:00 PM
without blurry/obscured text on the right (edited)
Avatar
meowcrocontroller 10/28/2023 7:01 PM
thanks!
Avatar
Avatar
Steveyboi
its fine for me since i have 1440p screen
meowcrocontroller 10/28/2023 7:01 PM
same here
Avatar
wow cool
7:23 PM
how do i emulate the timer correctly now?
7:23 PM
can anyone help me?
Avatar
meowcrocontroller 10/28/2023 7:46 PM
I am analyzing your frontend code, however my python skills are quite lacking
Avatar
also i am moving register display to a seperate window
Avatar
good idea this way youll have even less performance
7:53 PM
and your code will work even worse with sway or other tiling wms (edited)
Avatar
what
Avatar
more windows = more slower (kinda)
Avatar
i think it'll be faster
7:55 PM
i'll only update the register display when the window is actually open
Avatar
ok i seperated the main window and the register display
8:27 PM
i also made it not go into single step on startup
Avatar
hmm
8:39 PM
even with my use keyboard sfrs feature i can't access diagnostic on CWII roms (edited)
8:45 PM
diagnostic appears to be broken i think
8:45 PM
can't access even with F040H = 0xDB
Avatar
meowcrocontroller 10/28/2023 8:47 PM
does the ROM even have them?
Avatar
in fx-880BTG emulator ROM check_diag_key: 3:8334H F8CE PUSH LR 3:8336H F45E PUSH ER4 3:8338H 0501 MOV R5, #01H 3:833AH 0405 MOV R4, #05H 3:833CH 0010 MOV R0, #10H 3:833EH 9011F046 ST R0, F046H 3:8342H F20130DA BL delay_1c .l_012: 3:8346H 9010F040 L R0, F040H 3:834AH 70DB CMP R0, #DBH 3:834CH C805 BNE .l_024 3:834EH F20130EA BL delay_10c 3:8352H 14FF ADD R4, #-1 3:8354H 8040 MOV R0, R4 3:8356H C8F7 BNE .l_012 .l_024: 3:8358H 7400 CMP R4, #00H 3:835AH C807 BNE .l_036 3:835CH 0004 MOV R0, #04H 3:835EH 901191E0 ST R0, 91E0H 3:8362H 0010 MOV R0, #10H 3:8364H 901191E1 ST R0, 91E1H 3:8368H 0500 MOV R5, #00H .l_036: 3:836AH F0017076 BL set_ko_0 3:836EH 8050 MOV R0, R5 3:8370H F41E POP ER4 3:8372H F28E POP PC
8:47 PM
i wonder if you can read assembly
Avatar
meowcrocontroller 10/28/2023 8:48 PM
the only assembly language i am somewhat familiar with is risc-v :3
Avatar
welp i will come back later, have to go for a bit
Avatar
i added key highlighting, now you can see which keys are being held
9:41 PM
looks great imo
9:41 PM
also reworked the keyboard algorithm a bit
9:42 PM
now how tf do i emulate the timer correctly (edited)
9:45 PM
currently the display thread is 30-40 FPS
9:45 PM
which is great
Avatar
meowcrocontroller 10/28/2023 10:17 PM
i kinda wanna port delta's emulator to a microcontroller
10:17 PM
like a Pi Pico or esp32
Avatar
lifeemu wanted to write an emulator to port it to a calculator
Avatar
meowcrocontroller 10/28/2023 10:41 PM
I wanted to try Delta's ncurses frontend (edited)
10:41 PM
Is my terminal configured incorrectly?
Avatar
maybe
Avatar
meowcrocontroller 10/28/2023 11:04 PM
I had to compile it with ncursesw instead of ncurses
Avatar
glhf I have no idea how windows stuff works
Avatar
meowcrocontroller 10/28/2023 11:12 PM
it's on ubuntu
Avatar
Huh, I have no idea
11:14 PM
Actually I think I had this issue
11:15 PM
Can't remember how to fix tho
Avatar
meowcrocontroller 10/28/2023 11:16 PM
I modified LD_FLAGS from -lncurses to -lncursesw
Avatar
done a clean build after that?
Avatar
meowcrocontroller 10/28/2023 11:19 PM
yes
Avatar
No clue
11:19 PM
It works on my machine
11:19 PM
¯\_(ツ)_/¯
Avatar
try compiling on wsl
Avatar
meowcrocontroller 10/29/2023 12:07 AM
how are pixels stored in memory? 8 adjacent pixels in 1 byte?
12:07 AM
(i am porting the emulator to a pi pico)
Avatar
yes
12:07 AM
1 byte = 8 pixels
Avatar
meowcrocontroller 10/29/2023 12:07 AM
horizontally adjacent?
Avatar
yes
Avatar
Avatar
meowcrocontroller
(i am porting the emulator to a pi pico)
... huh
Avatar
also in the screen memory there are some bytes that aren't used
Avatar
Avatar
Delta
... huh
meowcrocontroller 10/29/2023 12:08 AM
a raspberry pi pico microcontroller (not the fullsize linux pi) with a tiny screen
Avatar
I know what a pico is
12:09 AM
Used it a few times
12:09 AM
The PIO is very cool
Avatar
meowcrocontroller 10/29/2023 12:09 AM
it really is
12:09 AM
can bitbang dvi/hdmi from there
Avatar
hmm another RPI developer i see
Avatar
Avatar
meowcrocontroller
can bitbang dvi/hdmi from there
Wait really? What resolution
12:13 AM
And you'd need differential drivers no?
Avatar
Avatar
Delta
Wait really? What resolution
meowcrocontroller 10/29/2023 12:18 AM
just some resistors
12:18 AM
Bitbanged DVI on the RP2040 Microcontroller. Contribute to Wren6991/PicoDVI development by creating an account on GitHub.
12:18 AM
surprisingly high res
12:23 AM
if (ctx->core.regs.pc == 0x2ec0 || count % 1000 == 0) what's located at 0x2ec0?
12:23 AM
some display update routine?
Avatar
its all commented out
12:24 AM
ignore it
Avatar
meowcrocontroller 10/29/2023 12:25 AM
it's in the main function
12:25 AM
that's when rendering the screen happens
Avatar
Avatar
meowcrocontroller
if (ctx->core.regs.pc == 0x2ec0 || count % 1000 == 0) what's located at 0x2ec0?
Ah yes that
12:27 AM
If I render the screen each frame it's slow as shit
12:27 AM
So I "hooked" the render function
Avatar
meowcrocontroller 10/29/2023 12:27 AM
makes sense!
Avatar
But as some stuff writes direct to screen I also render every 1000 instructions (edited)
Avatar
meowcrocontroller 10/29/2023 12:28 AM
got it!
12:28 AM
ahh i need to get reading from memory right lol
12:28 AM
i have a function to draw pixels to my screen
12:28 AM
void render(struct u8_sim_ctx *ctx) { int offset = 0; for (int y = 0; y < 31; y++) { for (int x = 0; x < (96 / 8); x++) { uint8_t byte = read_mem_data(&ctx->core, 0, 0xf800 + offset, 1); for (int i = 0; i < 7; i++) { if (byte & 0x01) gfx_draw_pixel(&myGfx, (x * 8) + i, y, RGB565_WHITE); else gfx_draw_pixel(&myGfx, (x * 8) + i, y, RGB565_BLACK); byte = byte >> 1; } offset++; } } }
Avatar
All the commented out stuff can be ignored, I was RE-ing some of the maths routines so I could narrow down a bug in my core
Avatar
meowcrocontroller 10/29/2023 12:28 AM
something's off here
12:28 AM
will take a break and come back to it
Avatar
Yeah that looks about right
12:29 AM
Ah I see your issue
12:29 AM
Your offset is not being updated correctly
12:29 AM
Each row takes up 16 bytes
12:30 AM
However only the first 12 are rendered
12:30 AM
After each line add on 4 to the offset
Avatar
meowcrocontroller 10/29/2023 12:30 AM
oooh, got it! i thought the unused bytes were a row, not a collumn
Avatar
meowcrocontroller 10/29/2023 12:40 AM
oh wow, i have a blinking cursor
Avatar
meowcrocontroller 10/29/2023 12:54 AM
12:54 AM
yipee :3
Avatar
meowcrocontroller 10/29/2023 1:02 AM
how is the timer emulated in u8_emu?
Avatar
Avatar
meowcrocontroller
Click to see attachment 🖼️
meowcrocontroller 10/29/2023 1:19 AM
yea here i was missing a pixel every 7 pixels, i fixed it
Avatar
Avatar
meowcrocontroller
how is the timer emulated in u8_emu?
meowcrocontroller 10/29/2023 2:30 AM
oh, it doesn't
Avatar
meowcrocontroller 10/29/2023 3:08 AM
well, I think I'll wrap it up for today, didn't understand much of how the timer (timers?) are supposed to work
3:10 AM
While clearing the screen is so quick
3:10 AM
It's a bit odd how drawing the lines of text takes a long time
Avatar
Avatar
meowcrocontroller
well, I think I'll wrap it up for today, didn't understand much of how the timer (timers?) are supposed to work
the timer advances by some amount every instruction
4:43 AM
depending on the cycle count of said instruction
Avatar
meowcrocontroller 10/29/2023 4:51 AM
Does it have a specified frequency?
Avatar
i think so yes
Avatar
Avatar
meowcrocontroller
It's a bit odd how drawing the lines of text takes a long time
More instructions to write text than to clear
Avatar
Avatar
pitust
the timer advances by some amount every instruction
i thought the timer only counts up in stop mode... if this is the case then delta needs to implement cycle counts so i can implement the timer correctly
Avatar
so in delta's core i tried changing res = sub_impl(val0, val1, op0->size, &psw0); res = sub_impl(res, carry, op0->size, &psw1); to res = sub_impl(val0, carry, op0->size, &psw0); res = sub_impl(res, val1, op0->size, &psw1); (edited)
10:50 AM
it actually made the cursor appear again
10:50 AM
on CWII
10:51 AM
but on the other hand, the characters are no longer drawn
10:51 AM
rip
10:52 AM
hmm it actually displays in lineio
10:53 AM
hmm looks like the result always 0 is a different issue
Avatar
Avatar
Steveyboi
hmm looks like the result always 0 is a different issue
advanced off topic hunter 10/29/2023 10:57 AM
whar
10:58 AM
1=0
Avatar
yes
10:59 AM
CWII is a... special kind
10:59 AM
much harder to emulate correctly
Avatar
Avatar
Steveyboi
CWII is a... special kind
advanced off topic hunter 10/29/2023 10:59 AM
casio especially reprogrammed the thing ig
Avatar
casio probably rewrote a lot of the calculation algorithms
11:01 AM
as evident by the forensic test result being different on CWII (9.000000000000000075528)
11:02 AM
on pre-CWII (excluding original MS) the result is 9.00000000733338
Avatar
Avatar
Steveyboi
CWII is a... special kind
The Administrator 10/29/2023 11:06 AM
0F4XXh
Avatar
huh....the cursor is blinking again...
11:12 AM
hmm
11:13 AM
ehh if it works it works
11:13 AM
yeah so the CMPC works now
Avatar
i found num_add in fx-880BTG emu rom
12:56 PM
time to disassemble stuff
12:58 PM
hmm the addition algorithm looks... unchanged...?
12:59 PM
well can't know for sure
Avatar
meowcrocontroller 10/29/2023 3:50 PM
does having a timer or not affect emulation speed?
3:50 PM
(interrupts cascades and such)
Avatar
nope
3:53 PM
if you actually implement it correctly
Avatar
and you definitely need a timer if you have a correct implementation of the emulator keyboard and you want it working
4:02 PM
if not it'll be like this
4:02 PM
the key is sometimes delayed
Avatar
meowcrocontroller 10/29/2023 4:03 PM
Do i just need to increment some SFR value periodically to get a timer?
4:03 PM
I can do that easily on my Pico
Avatar
Avatar
meowcrocontroller
Do i just need to increment some SFR value periodically to get a timer?
uh yeah
4:04 PM
its a word at F022H
Avatar
meowcrocontroller 10/29/2023 4:04 PM
Yuup, saw it in your frontend code
4:06 PM
do i need to do anything with the target value at F020H?
Avatar
compare F022H with F020H
4:06 PM
if it is equal stop mode is disabled
Avatar
meowcrocontroller 10/29/2023 4:07 PM
okay, and in stop mode it's not executing instructions, only the timer is running, right? (edited)
Avatar
yes
Avatar
meowcrocontroller 10/29/2023 4:08 PM
also, what is the timer frequency?
Avatar
128 KHz iirc
4:08 PM
for ES+
4:09 PM
Avatar
meowcrocontroller 10/29/2023 4:12 PM
oh, also need to implement interrupts?
4:16 PM
so my understanding is (correct me if I'm wrong): sfr 9 controls stop mode, when entering stop mode, timer is reset
4:17 PM
when the timer counter is equal to the target value, it exits stop mode
4:17 PM
it also exits stop mode on key presses?
Avatar
Avatar
meowcrocontroller
so my understanding is (correct me if I'm wrong): sfr 9 controls stop mode, when entering stop mode, timer is reset
also note F008H
4:26 PM
a 5xH byte will be written to it, then immediately followed by AxH, in that exact order
4:27 PM
that is needed to enable the stop code acceptor (F009H.1) (edited)
Avatar
Avatar
meowcrocontroller
it also exits stop mode on key presses?
yes
4:27 PM
on real hw it also sets F014H to 2
4:28 PM
and when no key is pressed after stop mode exits F014H is set to 20H
Avatar
also the keypress and the stop mode exit is also an interrupt
4:43 PM
F014H is an IRQ SFR
4:46 PM
also should repost this, this is from simwrapper.js of the online classpad emulator const REG = { // ... // SFR STPACP: 0xF008, SBYCON: 0xF009, IE0: 0xF010, IE1: 0xF011, IRQ0: 0xF014, IRQ1: 0xF015, } (edited)
4:48 PM
also this is an interrupt table list from the same JS file // interrupt table const _intr_tbl = [ // [vector_adrs, ie_adrs, ie_bit, irq_adrs, irq_bit, intname] [ 0x0008, 0x0000, 0, 0xf014, 0, "WDTINT" ], [ 0x000a, 0xf010, 1, 0xf014, 1, "XI0INT" ], [ 0x000c, 0xf010, 2, 0xf014, 2, "XI1INT" ], [ 0x000e, 0xf010, 3, 0xf014, 3, "XI2INT" ], [ 0x0010, 0xf010, 4, 0xf014, 4, "XI3INT" ], [ 0x0012, 0xf010, 5, 0xf014, 5, "TM0INT" ], [ 0x0014, 0xf010, 6, 0xf014, 6, "L256SINT" ], [ 0x0016, 0xf010, 7, 0xf014, 7, "L1024SINT" ], [ 0x0018, 0xf011, 0, 0xf015, 0, "L4096SINT" ], [ 0x001a, 0xf011, 1, 0xf015, 1, "L16384SINT"], [ 0x001c, 0xf011, 2, 0xf015, 2, "SIO0INT" ], [ 0x001e, 0xf011, 3, 0xf015, 3, "I2C0INT" ], [ 0x0020, 0xf011, 4, 0xf015, 4, "I2C1INT" ], [ 0x0022, 0xf011, 5, 0xf015, 5, "BENDINT" ], [ 0x0024, 0xf011, 6, 0xf015, 6, "BLOWINT" ], [ 0x0026, 0xf011, 7, 0xf015, 7, "RTCINT" ], [ 0x0028, 0xf012, 0, 0xf016, 0, "AL0INT" ], [ 0x002a, 0xf012, 1, 0xf016, 1, "AL1INT" ] ];
4:49 PM
btw the SimU8.dll is made by oki/lapis so this is very accurate (lapis probably licensed the SimU8.dll source code to casio) (edited)
Avatar
meowcrocontroller 10/29/2023 5:08 PM
are interrupts necessary to implement? or is stop mode and timer enough
Avatar
i think stop and timer is enough
5:29 PM
if you want you can go emulate the keyboard now
5:31 PM
also i wonder if you plan to add multicalc support
Avatar
meowcrocontroller 10/29/2023 5:43 PM
for the keyboard I'm using Delta's approach
5:44 PM
that doesn't allow for multiple keypresses but it's good enough for me
Avatar
emu rom doesn't support multiple key presses anyways
Avatar
the actual calc doesnt handle them very well either
5:46 PM
apart from diagnostic mode (edited)
Avatar
diagnostic mode on CWII is kinda flawed too
5:51 PM
i think they only intended for only [CATALOG]+[AC]+[ON]
5:51 PM
(there are 2 diagnostic mode combinations on CWII)
Avatar
oh lol
Avatar
1 i just mentioned, the other is [SHIFT]+[7]+[CATALOG]+[ON]
5:53 PM
whats the difference
Avatar
[SHIFT]+[7]+[ON] doesn't work on CWII
5:54 PM
you have to also hold [CATALOG]
Avatar
quality
5:54 PM
yeah but what does cat+ac+on do differently from shift+7+cat+on
Avatar
well, nothing
Avatar
@Steveyboi does diag mode work on the CW II emu?
Avatar
if i force F040H to DBH, on startup it should go to the fake math problem test screen, but it doesn't appear (i am talking about this screen below) 1+1=? 00/01 Press AC
6:11 PM
however jumping to the main diagnostic function works just fine
Avatar
hmm the code gets stuck here .l_0BC: 1:D602H 0028 MOV R0, #28H 1:D604H 9011F400 ST R0, F400H 1:D608H A0F1F410 TB F410H.7 1:D60CH C802 BNE .l_0CC 1:D60EH 1E03 ADD R14, #03H 1:D610H CEF8 BAL .l_0BC
6:59 PM
lemme try setting F410H to 80H
7:01 PM
it works if i set F410H when the core gets stuck in that spot
7:02 PM
but if you restart from the beginning it gets stuck in a different location
7:18 PM
as you can see it works just fine
Avatar
how are checksums calculated?
Avatar
the checksum calculation function is very weird
Avatar
meowcrocontroller 10/29/2023 7:20 PM
without any timer, shouldn't the calculator get stuck in stop mode after boot?
Avatar
Avatar
Steveyboi
the checksum calculation function is very weird
hmm
7:20 PM
why
7:20 PM
where is it
Avatar
calc_checksum: 2:3136H F8CE PUSH LR 2:3138H F87E PUSH QR8 2:313AH E800 MOV ER8, #00H 2:313CH 0E00 MOV R14, #00H 2:313EH 0FFC MOV R15, #FCH 2:3140H EA00 MOV ER10, #00H 2:3142H F0AA LEA [ER10] .l_00E: 2:3144H E3089A52 L ER10, 8:[EA+] 2:3148H FE8F NOP 2:314AH 88A8 SUB R8, R10 2:314CH 89B9 SUBC R9, R11 2:314EH EEFE ADD ER14, #7EH 2:3150H C8F9 BNE .l_00E 2:3152H EE00 MOV ER14, #00H 2:3154H EA00 MOV ER10, #00H 2:3156H F0AA LEA [ER10] .l_022: 2:3158H E3019A52 L ER10, 1:[EA+] 2:315CH FE8F NOP 2:315EH 88A8 SUB R8, R10 2:3160H 89B9 SUBC R9, R11 2:3162H EEFE ADD ER14, #7EH 2:3164H C8F9 BNE .l_022 2:3166H EE00 MOV ER14, #00H 2:3168H EA00 MOV ER10, #00H 2:316AH F0AA LEA [ER10] .l_036: 2:316CH E3029A52 L ER10, 2:[EA+] 2:3170H FE8F NOP 2:3172H 88A8 SUB R8, R10 2:3174H 89B9 SUBC R9, R11 2:3176H EEFE ADD ER14, #7EH 2:3178H C8F9 BNE .l_036 2:317AH EE00 MOV ER14, #00H 2:317CH EA00 MOV ER10, #00H 2:317EH F0AA LEA [ER10]
7:21 PM
.l_04A: 2:3180H E3039A52 L ER10, 3:[EA+] 2:3184H FE8F NOP 2:3186H 88A8 SUB R8, R10 2:3188H 89B9 SUBC R9, R11 2:318AH EEFE ADD ER14, #7EH 2:318CH C8F9 BNE .l_04A 2:318EH EE00 MOV ER14, #00H 2:3190H EA00 MOV ER10, #00H 2:3192H F0AA LEA [ER10] .l_05E: 2:3194H E3049A52 L ER10, 4:[EA+] 2:3198H FE8F NOP 2:319AH 88A8 SUB R8, R10 2:319CH 89B9 SUBC R9, R11 2:319EH EEFE ADD ER14, #7EH 2:31A0H C8F9 BNE .l_05E 2:31A2H 0E00 MOV R14, #00H 2:31A4H 0FE0 MOV R15, #E0H 2:31A6H EA00 MOV ER10, #00H 2:31A8H F0AA LEA [ER10] .l_074: 2:31AAH E3059A52 L ER10, 5:[EA+] 2:31AEH FE8F NOP 2:31B0H 88A8 SUB R8, R10 2:31B2H 89B9 SUBC R9, R11 2:31B4H EEFE ADD ER14, #7EH 2:31B6H C8F9 BNE .l_074 2:31B8H 0EF6 MOV R14, #F6H 2:31BAH 0F1F MOV R15, #1FH 2:31BCH EA00 MOV ER10, #00H 2:31BEH F0AA LEA [ER10] .l_08A: 2:31C0H E3079A52 L ER10, 7:[EA+] 2:31C4H FE8F NOP 2:31C6H 88A8 SUB R8, R10 2:31C8H 89B9 SUBC R9, R11 2:31CAH EEFE ADD ER14, #7EH 2:31CCH C8F9 BNE .l_08A 2:31CEH F085 MOV ER0, ER8 2:31D0H F83E POP QR8 2:31D2H F28E POP PC
Avatar
ok cool
Avatar
its a word sum like on CWI
7:22 PM
but very strange
Avatar
oh is it just word sum on cwi and earlier?
Avatar
on ES PLUS its byte sum
Avatar
Avatar
Steveyboi
but very strange
negative sum of FC00H first bytes of segment 8, all bytes in segment 1 - 4, E000H first bytes of segment 5 and 1FF6H first bytes in segment 7 (edited)
7:24 PM
but segment 8 contains the high bytes of screen data
7:24 PM
and some QR code data is also written there
7:24 PM
weird
Avatar
meowcrocontroller 10/29/2023 7:27 PM
am i reading stop accept correctly? uint8_t stpacp = read_mem_data(&ctx->core, 0, 0xF008, 1); if (ctx->stop_accept[0]) if (stpacp & 0xa0 == 0xa0 && ctx->stop_accept[1] == 0) ctx->stop_accept[1] = 1; else ctx->stop_accept[0] = 0; else if (stpacp & 0x50 == 0x50) ctx->stop_accept[0] = 1; (edited)
Avatar
yeah i think
Avatar
meowcrocontroller 10/29/2023 7:28 PM
i don't have the timer yet
7:28 PM
shouldn't the calculator go into stop mode and get stuck there?
Avatar
yea but after the counter reaches the target an interrupt is triggered which unlocks the calc from stop mode
Avatar
meowcrocontroller 10/29/2023 7:29 PM
well mine is not going into stop mode
7:29 PM
i should see it get stuck there but it's running
Avatar
Avatar
meowcrocontroller
well mine is not going into stop mode
do you have this yet def sbycon(self): sbycon = self.sim.sfr[9] if sbycon & (1 << 1) and all(self.stop_accept): self.stop_mode = True self.stop_accept = [False, False] self.sim.sfr[8] = 0 self.sim.sfr[9] = 0 self.sim.sfr[0x22] = 0 self.sim.sfr[0x23] = 0
Avatar
meowcrocontroller 10/29/2023 7:30 PM
oh, i am not setting 0x22 and 0x23 to zero
7:30 PM
just 0xF008 and 09
Avatar
actually i should remove the self.sim.sfr[9] = 0
Avatar
meowcrocontroller 10/29/2023 7:32 PM
uint8_t sbycon = read_mem_data(&ctx->core, 0, 0xF009, 1); if ((sbycon & (1 << 1)) && ctx->stop_accept[0] && ctx->stop_accept[1]) { ctx->stop_mode = 1; ctx->stop_accept[0] = 0; ctx->stop_accept[1] = 0; write_mem_data(&ctx->core, 0, 0xF008, 1, 0); // write_mem_data(&ctx->core, 0, 0xF009, 1, 0); write_mem_data(&ctx->core, 0, 0xF022, 1, 0); write_mem_data(&ctx->core, 0, 0xF023, 1, 0); }
Avatar
ya looks good
7:33 PM
i just decompiled the jar of beucalc 0.4b (owner's java emulator)
7:33 PM
time to look at how he implements the timer
Avatar
meowcrocontroller 10/29/2023 7:33 PM
it's still not stopping
Avatar
so i can steal it
Avatar
Avatar
meowcrocontroller
it's still not stopping
here this is the code that stops the timer def timer(self): if self.sim.sfr[0x25] & 1: counter = (self.sim.sfr[0x23] << 8) + self.sim.sfr[0x22] target = (self.sim.sfr[0x21] << 8) + self.sim.sfr[0x20] counter = (counter + 1) & 0xffff self.sim.sfr[0x22] = counter & 0xff self.sim.sfr[0x23] = counter >> 8 if counter == target and self.stop_mode: self.stop_mode = False self.sim.sfr[9] &= ~(1 << 1) self.sim.sfr[0x14] = 0x20 if not config.real_hardware: for i in range(3): if config.hardware_id == 0: self.sim.data_mem[0x800 + i] = 0 if config.hardware_id in (4, 5): self.sim.rw_seg[0x8e00 + i] = 0 else: self.sim.data_mem[0xe00 + i] = 0
7:34 PM
and actually increments the counter
Avatar
meowcrocontroller 10/29/2023 7:34 PM
it's not stopping the cpu i mean
7:34 PM
my goal rn is to get the cpu into stop mode
7:34 PM
i don't have the timer implemented just yet
Avatar
wrap an if (ctx->stop_mode) around the main stepping code
Avatar
meowcrocontroller 10/29/2023 7:35 PM
i did
Avatar
huh
Avatar
meowcrocontroller 10/29/2023 7:35 PM
im only stepping and checking the stpcap when stop_mode=0
Avatar
add sth like printf("%s", ctx->stop_mode); before the step code? (edited)
Avatar
meowcrocontroller 10/29/2023 7:37 PM
i know that stop_mode is not getting set
7:38 PM
(so far my code doesn't have any way of exiting stop mode)
Avatar
Avatar
meowcrocontroller
i know that stop_mode is not getting set
have you called the sbycon function?
Avatar
meowcrocontroller 10/29/2023 7:38 PM
yess
Avatar
strange
Avatar
meowcrocontroller 10/29/2023 7:39 PM
this is what i have in my loop (other than the lcd render)
Avatar
try adding a test printf inside the sbycon if statement?
7:41 PM
ok what /* */ package net.enderkitty.calc; /* */ /* */ public class Timer { /* */ private static final long NS_PER_SECOND = 1000000000L; /* */ private static final long MAX_NS_PER_UPDATE = 1000000000L; /* */ private static final int MAX_TICKS_PER_UPDATE = 100; /* */ private double ticksPerSecond; /* */ private long lastTime; /* */ public int ticks; /* */ public double a; /* */ public double timeScale; /* */ public double passedTime; /* */ /* */ public Timer(double ticksPerSecond) { /* 15 */ this.timeScale = 1.0D; /* 16 */ this.passedTime = 0.0D; /* 17 */ this.ticksPerSecond = ticksPerSecond; /* 18 */ this.lastTime = System.nanoTime(); /* */ } /* */ /* */ public void advanceTime() { /* 22 */ long now = System.nanoTime(); /* 23 */ long passedNs = now - this.lastTime; /* 24 */ this.lastTime = now; /* 25 */ if (passedNs < 0L) { /* 26 */ passedNs = 0L; /* */ } /* 28 */ if (passedNs > 1000000000L) { /* 29 */ passedNs = 1000000000L; /* */ } /* */ /* 32 */ this.passedTime += passedNs * this.timeScale * this.ticksPerSecond / 1.0E9D; /* 33 */ this.ticks = (int)this.passedTime; /* 34 */ if (this.ticks > 100) { /* 35 */ this.ticks = 100; /* */ } /* 37 */ this.passedTime -= this.ticks; /* 38 */ this.a = this.passedTime; /* */ } /* */ } /* Location: C:\Users\GWE\Download\Compressed\beucalc04b\beucalc.jar!\net\enderkitty\calc\Timer.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */ (decompiled beucalc code)
Avatar
Avatar
Steveyboi
try adding a test printf inside the sbycon if statement?
meowcrocontroller 10/29/2023 7:51 PM
it doesn't enter the if
Avatar
then its probably a problem with either 1. the sbycon variable 2. the stop_accept array
7:53 PM
try printing those two (right before the if) to see if any of them have problems
Avatar
there we go!
Avatar
meowcrocontroller 10/29/2023 8:01 PM
yayy!!!
Avatar
i totally didn't steal the code from beucalc
Avatar
Avatar
Steveyboi
then its probably a problem with either 1. the sbycon variable 2. the stop_accept array
meowcrocontroller 10/29/2023 8:02 PM
sbycon has the right value (2)
Avatar
the stop_accept?
Avatar
meowcrocontroller 10/29/2023 8:02 PM
both zero at all times
Avatar
well that ain't good
Avatar
Avatar
meowcrocontroller
this is what i have in my loop (other than the lcd render)
I don't think you need to reset stop accept every time
Avatar
reset stop accept in the sbycon?
Avatar
from ML610Q428/ML610Q429 manual
When data is written to STPACP in the order of “5nH”(n: an arbitrary value) and “0AnH”(n: an arbitrary value), the stop code acceptor is enabled. When the STP bit of the standby control register (SBYCON) is set to “1” in this state, the mode is changed to the STOP mode. When the STOP mode is set, the STOP code acceptor is disabled.
Avatar
Try removing it and see what happens
Avatar
meowcrocontroller 10/29/2023 8:06 PM
well it doesn't even get to run those lines anyways
Avatar
Try removing the stop_accept[0] = 0 from the first statement
8:09 PM
They don't have to be written one instruction after another
Avatar
meowcrocontroller 10/29/2023 8:09 PM
in sbycon?
Avatar
no
8:09 PM
the stpacp check
Avatar
meowcrocontroller 10/29/2023 8:09 PM
okay
Avatar
actually i am a bit wrong
8:10 PM
stpacp = self.sim.sfr[8] if self.stop_accept[0]: if stpacp & 0xa0 == 0xa0 and not self.stop_accept[1]: self.stop_accept[1] = True elif stpacp & 0x50 != 0x50: self.stop_accept[0] = False elif stpacp & 0x50 == 0x50: self.stop_accept[0] = True
8:10 PM
there we go
8:10 PM
much better
8:11 PM
btw my frontend is the first emulator to have fixed the AC break bug
👍 1
Avatar
meowcrocontroller 10/29/2023 8:11 PM
still nothing
Avatar
bruh
Avatar
meowcrocontroller 10/29/2023 8:13 PM
Avatar
maybe after any line that sets ctx->stop_accept[x] to 1 add a printf("%s", ctx->stop_accept);?
Avatar
meowcrocontroller 10/29/2023 8:16 PM
huh, they never get set to 1
Avatar
Oh ffs
8:19 PM
Figured it out
8:19 PM
This always trips me up too
8:19 PM
Operator precedence
8:19 PM
== has higher than &
Avatar
meowcrocontroller 10/29/2023 8:19 PM
parantheses
Avatar
Indeed
Avatar
Wrap the stpacp & 0x50 in brackets (edited)
8:20 PM
And a0
Avatar
this is why i hate C /j
Avatar
meowcrocontroller 10/29/2023 8:20 PM
yea
8:20 PM
now is good
Avatar
meowcrocontroller 10/29/2023 8:21 PM
damn, it bit me a few weeks ago too
Avatar
another project?
Avatar
meowcrocontroller 10/29/2023 8:21 PM
also led to some frustration and a lot of debugging other things
8:21 PM
yyea
8:21 PM
display drivers for a weird board
8:21 PM
(ox64, i have a love-hate relationship with it)
Avatar
Also btw your lcd rendering can be a whole lot faster
8:22 PM
I support callbacks for memory regions
8:22 PM
No need to rerender everything
Avatar
meowcrocontroller 10/29/2023 8:23 PM
ooooo ok, so i place pixels in my framebuffer as the cpu draws them
8:23 PM
and then periodically flush it to the screen
Avatar
Avatar
Delta
No need to rerender everything
hmm, cool, how do i implement it in my frontend
Avatar
No clue
8:23 PM
Not even gonna touch that
Avatar
meowcrocontroller 10/29/2023 8:23 PM
do you have a c example?
Avatar
Defining python functions that are called by C sounds painful
Avatar
Avatar
meowcrocontroller
do you have a c example?
Getting on in 5 mins
8:24 PM
Will do then
Avatar
meowcrocontroller 10/29/2023 8:24 PM
many thanks!
Avatar
Also I'm gonna do an SDL frontend anyways
Avatar
meowcrocontroller 10/29/2023 8:24 PM
c with sdl can be quite nicely compiled to WASM
Avatar
Exactly
Avatar
and after that maybe i'll just fork it and work on that instead...
Avatar
Also now that steveboi's frontend has worked out some of the kinks, I want something faster
⬆️ 1
Avatar
i hope you'll gonna add multicalc support
8:27 PM
wouldn't be cool if it only supported fx-83GT+ emu rom
Avatar
I'mma get that working first
8:27 PM
but remove my hacky rendering code
8:27 PM
and support config files
Avatar
json or ini
Avatar
ini as easier to parse
8:29 PM
ctx->core.mem.regions[6] = (struct u8_mem_reg){ .type = U8_REGION_DATA, .rw = false, .addr_l = 0x80000, .addr_h = 0x8FFFF, .acc = U8_MACC_FUNC, .read = &read_cb, .write = &write_cb };
8:29 PM
@meowcrocontroller
8:29 PM
struct { uint8_t (*read)(struct u8_core *, uint32_t); void (*write)(struct u8_core *, uint32_t, uint8_t); }; (edited)
8:30 PM
actually wait no that needs changing
8:30 PM
2 secs
8:31 PM
it's core, address, data (if write)
8:31 PM
that won't work yet, as changes not pushed
8:31 PM
just wait till a bit later when you can see how I've done it
Avatar
didn't realise it was that easy
Avatar
heck yeah
Avatar
got the callback working?
8:55 PM
nice
Avatar
nah
Avatar
actually should implement it
Avatar
ok got it opening a window
9:12 PM
this is good
Avatar
nice
Avatar
meowcrocontroller 10/29/2023 9:20 PM
oh cool, i have the timer working on the pico
Avatar
nice
9:21 PM
also do you plan to add multicalc support?
Avatar
meowcrocontroller 10/29/2023 9:21 PM
multiple models?
9:21 PM
or multiple calculators at the same time?
Avatar
multiple models
Avatar
meowcrocontroller 10/29/2023 9:22 PM
that can be done, just change the code memory pointer to another ROM and change the keymap
9:22 PM
i don't even have a keypad yet lol, just a 5way joystick to enter 1, plus, equals, ac and mode lol
Avatar
multiple models = includes classwiz, fx-82SOLAR II...
Avatar
meowcrocontroller 10/29/2023 9:23 PM
oh
9:23 PM
maybe
9:23 PM
but for now i want to get es plus working correctly
9:23 PM
emulation is still too slow
Avatar
meanwhile i managed to do this:$ obj/wwce-dis 1200 12341234 0:1200 add r2, 0x34 0:1202 add r2, 0x34
Avatar
uhhhh ok
9:24 PM
cool
Avatar
very useful stuff
9:25 PM
okay now ill actually write the emulator
Avatar
got the callback thing working, wasn't too hard
9:30 PM
used it to fill unallocated code memory with FF for real roms
Avatar
is the location of the display data fixed?
9:37 PM
(like sfr_base + whatever offset)
Avatar
yes
Avatar
always seems to be 0xF800
9:37 PM
I mean there could be one where it's different
9:37 PM
but we've not found one that does that yet
Avatar
ah i see
9:43 PM
so on classwiz, bit 4 of F310H is a solar power flag
9:44 PM
if the bit is set the calculator is in "solar mode"
Avatar
Avatar
Steveyboi
if the bit is set the calculator is in "solar mode"
ie the solar panel is providing power
Avatar
yup
9:54 PM
also the solar icon only appears in real roms (edited)
9:54 PM
so its done in hardware ig
Avatar
Avatar
Steveyboi
😈
if you wanna replicate it: first do the battery model test as normal, then set F310H to 0x10 (makes the calculator think it's receiving solar power) (edited)
10:12 PM
also i just found out the battery/solar model test uses keyboard SFRs
10:13 PM
here i did it on CY-000 emu rom
Avatar
Ok maaaaybe I do need a timer lol
11:39 PM
11:39 PM
brrrrrrrrrrrrrrrrrrrrrr
Avatar
meowcrocontroller 10/29/2023 11:49 PM
brrrrrrrrrrrrrrrrrrrrrrrrr
Avatar
you can use owner's implementation
Avatar
meowcrocontroller 10/30/2023 12:25 AM
Any tips on how to speed the emulation up?
12:26 AM
run multiple steps before updating keyboard?
Avatar
keyboard update shouldn't take long, unless a key is being pressed
Avatar
meowcrocontroller 10/30/2023 12:28 AM
im guessing it just takes a long time to execute instructions on the pi pico
Avatar
probably
12:28 AM
the code isn't the most optimal thing ever
Avatar
Avatar
meowcrocontroller
Any tips on how to speed the emulation up?
avoid calls to read_mem_data and write_mem_data if possible
12:31 AM
instead write to the array directly
Avatar
oh yeah, forgot to mention that
12:32 AM
memory reading and writing will be sped up at some point
12:32 AM
currently is quite horrifically slow
Avatar
i can probably do all the emulation stuff in C
12:33 AM
but the graphical stuff? absolutely not
Avatar
oh is easy enough
12:34 AM
will be done by end of today
12:34 AM
have to go eat now
12:34 AM
just need to do keyboard
Avatar
i'll be back at 12am UK time
Avatar
meowcrocontroller 10/30/2023 12:47 AM
hmm, reading from the array doesn't work quite right
12:47 AM
// uint8_t ready = read_mem_data(&ctx->core, 0, 0x8e00, 1); // this works uint8_t ready = emu_kb[0]; // this doesn't
12:48 AM
// write_mem_data(&ctx->core, 0, 0x8e01, 1, keys[key_num].ki); // works // write_mem_data(&ctx->core, 0, 0x8e02, 1, keys[key_num].ko); // works emu_kb[1] = keys[key_num].ki; // also works emu_kb[2] = keys[key_num].ko; // also works
12:50 AM
What did I do wrong
Avatar
meowcrocontroller 10/30/2023 12:53 AM
This is how the emu_kb array is mapped
12:53 AM
12:54 AM
0x8e00 should map to emu_kb[0], right?
Avatar
Yeah it should
Avatar
Avatar
meowcrocontroller
// uint8_t ready = read_mem_data(&ctx->core, 0, 0x8e00, 1); // this works uint8_t ready = emu_kb[0]; // this doesn't
meowcrocontroller 10/30/2023 1:08 AM
this is the only direct array access that doesn't work
1:08 AM
weird
Avatar
Maybe try printing the direct and the read mem data at each stage
Avatar
meowcrocontroller 10/30/2023 1:13 AM
Reading directly always gives 0
1:13 AM
But only for index 0
1:13 AM
It works for other indexes
Avatar
That's so weird
Avatar
meowcrocontroller 10/30/2023 1:22 AM
It is
1:22 AM
Reading works fine for other sfrs
1:22 AM
Including the display (edited)
Avatar
What the fuck
Avatar
meowcrocontroller 10/30/2023 1:39 AM
Idk
1:39 AM
Could be weirdness on my part
Avatar
I doubt it
Avatar
meowcrocontroller 10/30/2023 2:04 AM
When I'll have some more time I'll connect a ps/2 keyboard to the pico, maybe I can get a functional calculator that way :3
Avatar
Time to start selling casio clones
Avatar
meowcrocontroller 10/30/2023 2:10 AM
without roms to not get sued
2:11 AM
or with roms encrypted with the device's serial number lol
Avatar
Avatar
meowcrocontroller
without roms to not get sued
no u just move to china and you dont get sued its that easy
Avatar
meowcrocontroller 10/30/2023 2:23 AM
first i need to find a suitable keypad lol
2:23 AM
custom pcb (edited)
Avatar
use the real keypad :^)
Avatar
okay i have a new emulator now
3:59 AM
pros:
4:05 AM
supports lots of options
4:05 AM
cons:
4:05 AM
doesn't emulate correctly
Avatar
What've you got currently?
4:09 AM
A good first step is getting the diag routine to run
4:09 AM
Then lineio, because for some reason that works easier
4:09 AM
And is easier to debug (edited)
4:10 AM
My emulator is like 95% correct, however does not have a keyboard sooooo
4:10 AM
Need to work on that (edited)
4:10 AM
And options
4:10 AM
And CWII
Avatar
Avatar
Delta
What've you got currently?
not much
4:15 AM
im using your code
Avatar
so right now im just emulating peripherals
4:15 AM
ill do core later
4:15 AM
maybe
4:15 AM
Tbh I might rewrite my core later
4:16 AM
I want something smaller and faster
4:17 AM
It is really cool that it's working on a pico tho
4:17 AM
Could be a loooot faster
Avatar
meowcrocontroller 10/30/2023 4:17 AM
i need to do a bit of cleanup before publishing the Pico frontend
Avatar
Did you manage to get callbacks working?
Avatar
meowcrocontroller 10/30/2023 4:18 AM
Not yet
Avatar
If not I can post something in an hour ish that shows how to do it
Avatar
meowcrocontroller 10/30/2023 4:18 AM
I didn't try it yet
Avatar
i have a working insn decoder thats legally distinct from u8emu (edited)
Avatar
meowcrocontroller 10/30/2023 4:18 AM
But i would need to do callbacks for the sfr region, right?
Avatar
u8_reset isnt working
Avatar
meowcrocontroller 10/30/2023 4:19 AM
it's night time anyways here and I got school tomorrow, so I don't know if I'll have the time to work on it until the weekend
Avatar
Avatar
meowcrocontroller
But i would need to do callbacks for the sfr region, right?
Only the screen area but yes
Avatar
Avatar
Delta
If not I can post something in an hour ish that shows how to do it
meowcrocontroller 10/30/2023 4:19 AM
so no hurries 😅
Avatar
Avatar
pitust
i have a working insn decoder thats legally distinct from u8emu (edited)
Yeah I intend to replace mine with some big switch statements and bitmasking
4:20 AM
Then can also do some technically nonexistant instructions (edited)
4:20 AM
But which are implied by looking at the encoding
Avatar
my memory map is wrong
4:21 AM
data(0x8000, 0xE00, mem(ram)), data(0x8e00, 0x30, mem(kbd)), data(0xf000, 0x1000, mem(sfr)), text(0, 0x8000, mem(code)), code(0x8000, 0x8000, mem(code + 0x8000)), text(0x10000, 0x10000, mem(code + 0x10000)), rodata(0x80000, 0x10000, mem(code)), this is the working map
4:21 AM
// region 0 data map(0x0'8000, 0x0'0e30, mem + 0x0'0000, component::MapType::Data); map(0x0'f000, 0x0'1000, mem + 0x0'7000, component::MapType::Data); // code segments map(0x0'0000, 0x0'8000, rom + 0x0'0000, component::MapType::Both); map(0x0'8000, 0x0'8000, rom + 0x0'8000, component::MapType::Code); map(0x1'0000, 0x1'0000, rom + 0x1'0000, component::MapType::Both); map(0x8'0000, 0x1'0000, rom + 0x0'0000, component::MapType::ROData); this is the broken one
4:22 AM
hmm
4:22 AM
but thats the same thing
4:22 AM
ah
4:22 AM
i forgot to add regions
Avatar
That'll do it
Avatar
⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀ ⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
4:23 AM
works now
Avatar
Eventually I might do it in verilog, having an FPGA implementation sounds kinda cool
4:24 AM
u8 LLVM backend when?
4:24 AM
Make our own toolchain
4:24 AM
Our own ICs
Avatar
meowcrocontroller 10/30/2023 4:24 AM
Fpga Casio
Avatar
Avatar
Delta
And CWII
meowcrocontroller 10/30/2023 4:26 AM
Btw how tricky is the cwii to emulate?
4:26 AM
And what are the tricky parts?
Avatar
The tricky part is that some of the instructions are not implemented correctly by me
4:27 AM
The issue is I don't know which ones
4:27 AM
So I'll just have to spend a while RE-ing and instrumenting it
Avatar
couldnt you hook the web emulator
4:28 AM
to dump the pc + all regs for every instruction
4:28 AM
and diff
4:28 AM
or even just bisect it
Avatar
Yeah probably
4:29 AM
Actually could even just write a fuzzer
4:29 AM
I kind of want to know how it reacts to bad instructions
4:29 AM
so i think its time to add support for more real things
Avatar
Well not bad, but unrecognised by the manual
Avatar
whats the fx83gt+ face?
4:30 AM
(as an image or ideally svg) (edited)
Avatar
There's a png on the github
4:30 AM
And instructions on how to extract yourself from emu
Avatar
Avatar
Delta
There's a png on the github
alr
Avatar
Steveboi's private repo
4:31 AM
Missing the status bar tho (edited)
Avatar
can you send it to me
Avatar
In a bar, playing pool rn
4:32 AM
So not right now
4:37 AM
okay fine
5:21 AM
wait shit discord might compress it
Avatar
Avatar
Delta
And instructions on how to extract yourself from emu
actually i removed the instructions from the README of u8-emu-frontend but i still have it in simu8-frontend
6:12 AM
i think i should add it back
Avatar
oh my god math box is fcked
7:18 AM
(i tested the dice roll which should give random numbers between 1-6) (edited)
7:20 AM
oh wait attempts is 0
7:21 AM
tf!!!
7:21 AM
dangit can't set to 5
Avatar
omg i think i found bug
7:50 AM
at 3:0038H in fx-880BTG emu rom
7:50 AM
is MOV ER0, #-1 (edited)
7:51 AM
but after stepping through it the carry flag is set?????
7:51 AM
tf
7:51 AM
image 1: before image 2: after
Avatar
or is the problem incorrect instruction detection? 🤔
8:03 AM
hmm
Avatar
Avatar
Steveyboi
image 1: before image 2: after
also the zero flag should be cleared as well, its a negative number not zero...
Avatar
pinging in case delta didn't see it ping removed due to complaints (edited)
Avatar
Just woke up
3:21 PM
Think I fixed it
3:21 PM
Rebuild and give it a try
3:21 PM
My core needs rewritten ...
Avatar
will rebuild when i get home (which is like 5 hours later, i have 3 hrs of cram school)
Avatar
can you add me to your repo @Steveyboi?
Avatar
github username?
3:44 PM
oh nvm saw in your bio
Avatar
Have lectures till 5 so can't do anything till then
Avatar
thats fine (edited)
Avatar
is the ON button also part of ki/ko?
4:28 PM
or is it just connected to reset
Avatar
yes it's probably connected to reset
Avatar
Direct reset
Avatar
on is connected to reset but in a weird way
5:25 PM
for example when a calculator is hard bricked you cannot press ON or SHIFT+7+ON
Avatar
Maybe being held in a weird ELEVEL?
5:27 PM
Actually no that shouldn't matter
Avatar
Avatar
Steveyboi
for example when a calculator is hard bricked you cannot press ON or SHIFT+7+ON
Like it doesn't react at all?
5:29 PM
Or maybe it resets but hits something
Avatar
doesn't react at all
5:30 PM
on fx-580VN X there is a certain display glitch that acts like a hard brick
5:30 PM
when pressing ON the screen doesn't even turn off
Avatar
Avatar
Steveyboi
for example when a calculator is hard bricked you cannot press ON or SHIFT+7+ON
meowcrocontroller 10/30/2023 5:32 PM
it can get hard bricked?
Avatar
Well until you remove battery, but yes
Avatar
Avatar
meowcrocontroller
it can get hard bricked?
yes it can
6:38 PM
this is fastest hard brick method for fx-580VN X 1. do overflow in mathio 2. [logab] [x^] [DEL]*5
6:38 PM
i don't have an fx-570/991EX so idk if it works on there
Avatar
why does that happen?
Avatar
no idea
Avatar
also what happens on emulator
Avatar
you can just turn it right back on
Avatar
yeah but like
6:39 PM
where does control flow go (edited)
Avatar
haven't checked, at cram school rn
6:40 PM
have to go now
Avatar
Avatar
Steveyboi
when pressing ON the screen doesn't even turn off
LCD controller thing, maybe
Avatar
Like the LCD controller is in a bad mode but the actual CPU has recovered?
8:58 PM
You could test and see if it's still scanning the KO pins
Avatar
hmm looks like the attempts = 0 thing is a different issue
9:07 PM
MOV ER0, #-1 is correct now but attempts is still 0 (edited)
Avatar
Ok well atleast that bug is fixed
Avatar
most quality emulator
Avatar
windows: GUIs linux: console
Avatar
Wah wah ubsan
9:12 PM
This is why my core needs rewritten
9:12 PM
But once it works
9:12 PM
Then comparative fuzzing
Avatar
im using ubsan for checking for possible memory safety issues
Avatar
What is a safety
Avatar
its when my code does a null deref
9:14 PM
:^)
Avatar
See I know when my code does that as it segfaults lol
Avatar
yeah but it helps debugging segfaults
9:15 PM
okay wtf
Avatar
be me gdb ./sim.out r oooooh I'm a moron
9:15 PM
How my life be
Avatar
ah yeah i did that
Avatar
ubsan looks cool, how do i implement it in my frontend ^_^
Avatar
Avatar
Steveyboi
ubsan looks cool, how do i implement it in my frontend ^_^
by using a not cringe language
9:16 PM
like c++
9:16 PM
or c
Avatar
no
Avatar
i already have 1500 lines of fairly dense c++ code (edited)
9:16 PM
thats more than the core (lol)
Avatar
(i will switch to C once delta has done all the GUI work)
Avatar
okay why does my code not draw correctly
Avatar
idk
Avatar
okay hmm
9:22 PM
time to more debugging
9:25 PM
c++ for (size_t y = 0; y < m_height; y++) { for (size_t x = 0; x < m_width; x += 8) { uint8_t byte = mem[x / 8 + y * m_width / 8]; printf("px %d\n", x / 8 + y * m_width / 8); for (size_t xb = 0; xb < 8; xb++) { _updatePixel(x + xb, y, (byte << xb) & 0x80); } } }
9:25 PM
is this correct?
Avatar
🤷‍♂️
9:27 PM
it looks right
Avatar
What is m_width
9:31 PM
12?
9:31 PM
uh
9:31 PM
no
9:31 PM
m_width is 92
9:31 PM
Avatar
Ok I see your issue
9:31 PM
Each row is 16 bytes
Avatar
it draws something now
Avatar
Avatar
Delta
Each row is 16 bytes
oh is it aligned
9:32 PM
But only first 12 are rendered
9:32 PM
now its perfect
Avatar
nice
Avatar
i could do timer now
9:32 PM
ill fix the face code instead
Avatar
Yeah, and do keyboard
Avatar
when you are done with it pls open source it so i can steal fork your repo
Avatar
Avatar
Steveyboi
when you are done with it pls open source it so i can steal fork your repo
i will
Avatar
oh wait
9:35 PM
it's already open sourced isn't it?
Avatar
not all the new stuff
9:35 PM
ill push when i get done with the joys of sdl
9:35 PM
and graphics
9:35 PM
and then ill do new board code
9:36 PM
so i support other calcs
9:36 PM
and then timer
9:36 PM
Avatar
wow that looks much better
9:37 PM
fx-83GT+ 2nd aqua edition
Avatar
also you should remove the black bg (screen shadow) (edited)
Avatar
advanced off topic hunter 10/30/2023 9:38 PM
how tf do you guys do this
Avatar
code
Avatar
advanced off topic hunter 10/30/2023 9:38 PM
what lang
Avatar
Avatar
advanced off topic hunter
how tf do you guys do this
by having a week off school
9:38 PM
c++
Avatar
Avatar
advanced off topic hunter
what lang
pitust C++
9:39 PM
delta C
9:39 PM
me python
Avatar
Avatar
pitust
c++
advanced off topic hunter 10/30/2023 9:39 PM
oh hell nah security issues 100+
Avatar
Avatar
advanced off topic hunter
oh hell nah security issues 100+
lol no
Avatar
eww c++
Avatar
advanced off topic hunter 10/30/2023 9:39 PM
oh wait thats c
Avatar
c++ is similar tho
9:39 PM
but no
9:39 PM
my top quality C++ parses binary data structures completly safely
9:40 PM
c++ inline void operator++() { do { auto h = (ImageItem*)m_addr; m_addr += h->m_paylen + 8; if (this->operator*().m_tag == Tag::compatible) { auto& ent = this->operator*(); if (ent.m_paylen != strlen(compatible)) { printf("E: incompatible rom8 file\n"); exit(1); } if (memcmp(ent.m_pay, compatible, ent.m_paylen)) { printf("E: incompatible rom8 file\n"); exit(1); } } else { break; } } while (true); }
9:40 PM
pictured: "secure" input parsing
9:40 PM
i have a custom format for roms
9:40 PM
its called rom8
Avatar
Avatar
pitust
c++ inline void operator++() { do { auto h = (ImageItem*)m_addr; m_addr += h->m_paylen + 8; if (this->operator*().m_tag == Tag::compatible) { auto& ent = this->operator*(); if (ent.m_paylen != strlen(compatible)) { printf("E: incompatible rom8 file\n"); exit(1); } if (memcmp(ent.m_pay, compatible, ent.m_paylen)) { printf("E: incompatible rom8 file\n"); exit(1); } } else { break; } } while (true); }
advanced off topic hunter 10/30/2023 9:40 PM
there is an auto operator in c++ or did you write a header for this
Avatar
c++ has auto
9:40 PM
which does type deduction
Avatar
advanced off topic hunter 10/30/2023 9:40 PM
mind blown
Avatar
C++ vs C
Avatar
Avatar
advanced off topic hunter
oh hell nah security issues 100+
Reduce yourself to ashes
Avatar
Avatar
pitust
c++ inline void operator++() { do { auto h = (ImageItem*)m_addr; m_addr += h->m_paylen + 8; if (this->operator*().m_tag == Tag::compatible) { auto& ent = this->operator*(); if (ent.m_paylen != strlen(compatible)) { printf("E: incompatible rom8 file\n"); exit(1); } if (memcmp(ent.m_pay, compatible, ent.m_paylen)) { printf("E: incompatible rom8 file\n"); exit(1); } } else { break; } } while (true); }
this is like hard ub
9:41 PM
the cast violates strict aliasing
Avatar
I will have no disrespect against C or C++ (edited)
Avatar
Avatar
Steveyboi
me python
advanced off topic hunter 10/30/2023 9:41 PM
legends write in asm trollface
Avatar
Avatar
advanced off topic hunter
legends write in asm trollface
have you ever written anything in asm
9:41 PM
i mean i have
Avatar
Avatar
pitust
have you ever written anything in asm
advanced off topic hunter 10/30/2023 9:42 PM
have saw a program written in asm
Avatar
Avatar
pitust
the cast violates strict aliasing
I thought it's fine if it has the common initial sequence?
Avatar
Avatar
pitust
have you ever written anything in asm
i have written in ASM
9:42 PM
my enhanced SMB1 rom hack
Avatar
Avatar
pitust
i mean i have
Yes, very tiny bootloader
Avatar
advanced off topic hunter 10/30/2023 9:42 PM
waitwaitwaitwait how do you guys learn these
Avatar
Avatar
Delta
I thought it's fine if it has the common initial sequence?
ImageItem doesnt start with a uint8_t
Avatar
All it did was call my kern main
Avatar
internet
Avatar
; IN: inode in si read_inode: pushad ; sorry ; calculate group and index dec si mov ax, si xor dx, dx mov cx, getw(0x8000, s_inodes_per_group) div cx ; sign extend movzx eax, ax movzx edx, dx ; ax: ino_blk_grp ; dx: ino_tbl_idx ; read the block group info thingy pushad shr eax, 4 ; calculate 1 << extshift into ebx mov ebx, 1 mov cl, [extshift] shl ebx, cl ; smol volumes' bgd starts later mov edx, 4 cmp ebx, 2 cmove ebx, edx ; make sure to offset it add eax, ebx ; now, load! mov edi, 0x8200 diskload eax popad ; should we use inode256? cmp getw(0x8000, s_inode_size), 0x100 je read_inode256 ; keep going in the 2nd sector jmp read_inode_secondsec
Avatar
advanced off topic hunter 10/30/2023 9:42 PM
my brain is too tiny to learn programming
Avatar
this is my asm
9:43 PM
(500 lines of this)
Avatar
Avatar
advanced off topic hunter
my brain is too tiny to learn programming
stop spelling, join the technical side™ (edited)
Avatar
you can do it
9:43 PM
i believe in you
9:43 PM
anyway
9:43 PM
im using the wrong pixel format
9:43 PM
my whole thing uses SDL_PIXELFORMAT_RGBX8888
Avatar
Avatar
Steveyboi
stop spelling, join the technical side™ (edited)
advanced off topic hunter 10/30/2023 9:43 PM
spelling for life asking people around me for answer, effective /j
Avatar
also @pitust do you have checks for when the rom size is odd
Avatar
rom size odd?
Avatar
yes
Avatar
thats fake news and not real
9:45 PM
c++ virtual void loadRomData(rom8::File& file) { for (auto& rdat : file) { if (rdat.m_tag == rom8::Tag::rom) { if (rdat.m_paylen != 0x20000) { printf("E: rom size invalid\n"); exit(1); } m_rom = rdat.m_pay; } if (rdat.m_tag == rom8::Tag::calcType) { if (rdat[0] != (0x1 | 0x4)) { printf("E: rom for invalid calculator type (byte: %d)\n", rdat[0]); exit(1); } } } }
Avatar
check if rom size is odd, throw an error if it succeeds
Avatar
Avatar
pitust
thats fake news and not real
advanced off topic hunter 10/30/2023 9:46 PM
thats rhyme for some reason
Avatar
If you give mine too small of a rom it will shit itself and die
Avatar
advanced off topic hunter 10/30/2023 9:46 PM
*rhymes
Avatar
Also known as seg fault
Avatar
Avatar
pitust
c++ virtual void loadRomData(rom8::File& file) { for (auto& rdat : file) { if (rdat.m_tag == rom8::Tag::rom) { if (rdat.m_paylen != 0x20000) { printf("E: rom size invalid\n"); exit(1); } m_rom = rdat.m_pay; } if (rdat.m_tag == rom8::Tag::calcType) { if (rdat[0] != (0x1 | 0x4)) { printf("E: rom for invalid calculator type (byte: %d)\n", rdat[0]); exit(1); } } } }
i ensure the rom is 128k
9:46 PM
but you can not supply any rom
9:46 PM
if your rom8 file doesnt have one
Avatar
Avatar
pitust
i ensure the rom is 128k
only supporting casio ES/ES+ roms ic
9:47 PM
wonders if pitust knows that fx-520AZ emu rom uses 3 segments
Avatar
Avatar
Steveyboi
only supporting casio ES/ES+ roms ic
i check that calcType == CalcType::old|CalcType::emu (edited)
Avatar
huh
9:49 PM
old = ES?
Avatar
hmm ok
Avatar
this is a custom rom format so this is just file metadata
9:49 PM
i have a tool that parses it
Avatar
hmm ok
Avatar
and it also contains face data (png or svg but i dont have svg code yet), display location, gui key hitboxes, key names and model name
Avatar
Easier to parse than an ini
9:50 PM
I'm going to do a similar thing
Avatar
but all binary data
Avatar
Might just steal your format
Avatar
do you want to use a compatible format?
Avatar
something that can be easily edited with a text editor
Avatar
No, when I do this I make python scripts to deal with it
Avatar
rom8 is literally a binary format, you have to understand the file format to use it
Avatar
Avatar
Delta
No, when I do this I make python scripts to deal with it
i have a tool that handles it yeah
Avatar
There's a lot of stuff that syntactic sugar makes a whole lot easier (edited)
Avatar
ok i'll probably add support for rom8
9:53 PM
however i need to add a config setting for whether to treat the input binary as rom8 or raw u8 code
Avatar
Magic bytes for the header
Avatar
@pitust can you like write documentation for your rom8 format
Avatar
Avatar
Steveyboi
@pitust can you like write documentation for your rom8 format
sure ig
9:54 PM
9.74 KB
9:55 PM
here is the tool that handles it
9:55 PM
needs chafa.py and pillow if you want to have it draw faces
Avatar
For what? Making it easier to draw bounding boxes for buttons?
9:56 PM
Or just display
Avatar
if you use tool8.py show it will draw the face
9:56 PM
and if your terminal supports sixels ig
9:56 PM
which mine does
9:57 PM
and it can also tell you which keysym (a custom combination of emu ki+ko i use all over the place) matches a given x, y pair (edited)
Avatar
yeah i saw it has KI/KO setup
Avatar
here is the fx83gt+ emulator rom8
Avatar
The git thing I was talking about, we could make one for each ROM and have it automatically create rom8 files
10:00 PM
that was what i was thinking
Avatar
rom8 files are truly op for emulators
10:01 PM
just need some documentation and i can start adding support for it
10:01 PM
im writing docs rn
Avatar
Avatar
Steveyboi
just need some documentation and i can start adding support for it
The format uses a type-length-value encoding. One
Avatar
i need some kind of offset table
Avatar
offset table?
Avatar
sth like this (this is windows recycle bin metadata file format)
10:19 PM
i use struct.unpack
10:20 PM
i added offset comments to all the 3 structs
Avatar
alr how does stop mode work
Avatar
there is an SFR called STPACP at F008H
10:22 PM
a 0x5x byte is written then followed by 0xAx, in that exact order
10:22 PM
then bit 1 of F009H (SBYCON) is set which enables stop mode (edited)
10:23 PM
and you exit stop mode when?
Avatar
there are two words at F020H and F022H, they are the target and counter respectively
10:24 PM
if counter == target then an interrupt is triggered which exits stop mode
Avatar
does STPACP matter
10:24 PM
STPACP is disabled in stop mode
10:24 PM
Not exact chip
Avatar
thanks
Avatar
But they all work the same
Avatar
what do the values do tho
10:26 PM
or is it just anything
10:26 PM
hm
10:26 PM
okay ig anything
10:26 PM
maybe to make it harder to accidentally enter stop mode
Avatar
Yeah probably
Avatar
alr so if SBYCON.STP then wait for next frame
Avatar
yeah ig
Avatar
or until key is pressed?
Avatar
until key is pressed or when counter == target
Avatar
they both trigger (different) interrupts
Avatar
do i have to fire off the interrupt
Avatar
okay then ig
Avatar
They all just instantly return
10:30 PM
something to try: what does SBYCON.STP=1 SBYCON.HLT=1 do
Avatar
uhhhh idk
Avatar
its prohibited
10:30 PM
but like
10:30 PM
has to do something
10:33 PM
and i sync fb when i enter stop mode?
10:33 PM
ig
Avatar
If you like
10:35 PM
I just render when it's written to
10:35 PM
but that causes flicker
10:35 PM
especially since i can run really really fast
10:35 PM
because i blit the window asynchrnously (edited)
10:35 PM
(i blit every 16ms)
Avatar
How does the real calc avoid that then
10:37 PM
Just redraw every x ms?
Avatar
Avatar
Delta
How does the real calc avoid that then
uh
10:37 PM
they repaint quite slowly
10:38 PM
also remember the real calc has very very slow display refresh
Avatar
Avatar
Delta
But they all work the same
timer differs tho
10:39 PM
0xf020 is EXICON0
Avatar
The SFR addresses are different yes
10:39 PM
I found one that was closer at some point, will look later in a lecture rn
10:39 PM
But the way they work is the same
Avatar
sure okay (edited)
10:40 PM
oh ig its 0F030H
10:40 PM
and TM0D and TM0C
10:44 PM
what happens in the emu tho
10:45 PM
How does the official one work? (edited)
Avatar
in emu roms
Avatar
No idea
Avatar
what are you discussing here
10:46 PM
?
Avatar
i want to implement STOP and timer in my emu
Avatar
Avatar
pitust
in emu roms
Works the same, writes to the same SFRs
Avatar
for the fx83gt+ emu rom
Avatar
Avatar
Delta
Works the same, writes to the same SFRs
hmm
Avatar
Avatar
pitust
for the fx83gt+ emu rom
oh emu rom
Avatar
SBYCON doesnt ever become 1 for some reason
Avatar
They changed some things but not others
10:46 PM
Is kinda weird
Avatar
Avatar
pitust
SBYCON doesnt ever become 1 for some reason
Show code?
10:46 PM
im not sure if im ever running code
10:47 PM
c++ if (core->rd(0xf009) == 1) { printf("in STOP\n"); uint16_t sleep_for = core->r16(0xf020); // SBYCON.STP = 1, don't run if (kc == 0xff) return false; uint8_t ki = 1 << (kc >> 4); uint8_t ko = 1 << (kc & 0xf); core->wr(0x8e01, ki); core->wr(0x8e02, ko); return true; }
Avatar
Avatar
pitust
SBYCON doesnt ever become 1 for some reason
they probably don't want to use HLT
Avatar
sbycon is zero
Avatar
Never written ever?
Avatar
STP bit is bit 1 of F009H
Avatar
not bit 0
10:48 PM
thats why it doesn't work
Avatar
i think my emu is going wrong
10:48 PM
very
Avatar
Quite possibly
Avatar
hangs in 07e34 07e20 07e22 07e24 07e26 07e28 07e2a 07e2c 07e2e 07e30 07e32 07e34
10:51 PM
also i found a memory leak in mesa lmao
Avatar
bruh
Avatar
Indirect leak of 128 byte(s) in 1 object(s) allocated from: #0 0xaaaac3770664 in malloc (/home/pitust/code/wwce/obj/wwce-emu+0x120664) (BuildId: 5603a0b12af8ffebacf5aa038b4acd1df7e6b85d) #1 0xfffefe488560 (/usr/lib/dri/asahi_dri.so+0xb8560) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #2 0xfffefeb17a34 (/usr/lib/dri/asahi_dri.so+0x747a34) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #3 0xfffefebad424 (/usr/lib/dri/asahi_dri.so+0x7dd424) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #4 0xfffefeb70d44 (/usr/lib/dri/asahi_dri.so+0x7a0d44) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #5 0xfffefeb8a8d8 (/usr/lib/dri/asahi_dri.so+0x7ba8d8) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #6 0xfffefeb8ad7c (/usr/lib/dri/asahi_dri.so+0x7bad7c) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #7 0xfffefeb5c308 (/usr/lib/dri/asahi_dri.so+0x78c308) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #8 0xfffefeb53b40 (/usr/lib/dri/asahi_dri.so+0x783b40) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) #9 0xfffefeb614f0 (/usr/lib/dri/asahi_dri.so+0x7914f0) (BuildId: 1cee5509f46ffcd296c2e9657eec38039990feb4) (edited)
Avatar
okay so
10:53 PM
i broke something
Avatar
Avatar
pitust
hangs in 07e34 07e20 07e22 07e24 07e26 07e28 07e2a 07e2c 07e2e 07e30 07e32 07e34
looks like memset
10:54 PM
could be keyboard code?
Avatar
maybe
Avatar
lots of reads from 0x08e00 (edited)
10:56 PM
or writes
10:57 PM
wait no thats just me
10:57 PM
lol
10:58 PM
actual core emu stuff works hmm
11:00 PM
ah yes
11:00 PM
i was doing a display update every frame
Avatar
bruh
Avatar
okay still 0xf009 stays at zero
Avatar
you can try seperating the core and the peripherals (other than timer, stop mode and keyboard) into two threads
Avatar
Avatar
Steveyboi
you can try seperating the core and the peripherals (other than timer, stop mode and keyboard) into two threads
i could
11:01 PM
but (a) that sounds like a recipe for a data race
11:01 PM
and (b) nah ill just update every 1000 cycles or when entering stop mode
Avatar
Avatar
pitust
okay still 0xf009 stays at zero
that's weird
Avatar
what the fuck
11:02 PM
they ARE writing to it
Avatar
yes
11:02 PM
they are
11:03 PM
here is the code that enables stop mode 0:37E4H F00CF008 LEA F008H 0:37E8H 0250 MOV R2, #50H 0:37EAH 03A0 MOV R3, #A0H 0:37ECH 9231 ST R2, [EA] 0:37EEH 9351 ST R3, [EA+] 0:37F0H 0002 MOV R0, #02H 0:37F2H 9031 ST R0, [EA] 0:37F4H FE8F NOP 0:37F6H FE8F NOP
11:03 PM
in fx-83GT+ emu rom (for your convenience) (edited)
Avatar
SBYCON.HLT=1
11:03 PM
lol
Avatar
Avatar
pitust
SBYCON.HLT=1
that is definitely not what is supposed to happen... (edited)
Avatar
Avatar
Steveyboi
here is the code that enables stop mode 0:37E4H F00CF008 LEA F008H 0:37E8H 0250 MOV R2, #50H 0:37EAH 03A0 MOV R3, #A0H 0:37ECH 9231 ST R2, [EA] 0:37EEH 9351 ST R3, [EA+] 0:37F0H 0002 MOV R0, #02H 0:37F2H 9031 ST R0, [EA] 0:37F4H FE8F NOP 0:37F6H FE8F NOP
this is clearly what the asm says
11:05 PM
mov r0, 2
Avatar
st r0, [ea]
11:05 PM
yes
Avatar
look c l o s e l y
Avatar
MOV R0, #02H
11:05 PM
not 1
11:05 PM
but 2
Avatar
yes (edited)
11:05 PM
bit 2 is hlt
11:05 PM
oh no
11:05 PM
oh okay
11:05 PM
fuck
11:05 PM
i a idiot
11:05 PM
1 is halt
11:06 PM
also it seems that they are programming a sleep for 952 ticks
11:06 PM
or 0x3b8
11:13 PM
okay something is wrong
11:14 PM
the timer is... weird
11:14 PM
ah probably incorrect emulation
Avatar
if the timer is running too fast you can use the implementation in beucalc
Avatar
i somehow doubt their impl is correct
11:27 PM
c++ if (core->rd(0xf009)) { kc = face->update(core->m_mem + 0x7800); os::sleep(1'000'000); core->wr(0xf009, 0); core->w16(0xf020, 0); return true; }
11:27 PM
this is my new impl :^)
Avatar
-_-
11:29 PM
i can't believe you decided to make every stop mode state last for exactly 1 second
Avatar
nah ill make it take (number of ticks * 0.21ms) (edited)
11:29 PM
which is a good enough approximate of real hw
11:32 PM
in fact
11:32 PM
this is probably how it works
11:34 PM
wait noo
11:34 PM
oh i a idiot
11:34 PM
its the amount of .1ms i need to wait
Avatar
btw heres my reimplementation of beucalcs timer slowdown thing def timer(self): now = time.time_ns() passed_ns = now - self.last_time self.last_time = now if passed_ns < 0: passed_ns = 0 elif passed_ns > self.max_ns_per_update: passed_ns = 0 self.passed_time += passed_ns * self.tps / self.nsps ticks = int(self.passed_time) if self.passed_time < 100 else 100 self.passed_time -= ticks self.timer_tick(ticks)
11:36 PM
variable setup in __init__ self.nsps = 1e9 self.max_ns_per_update = 1e9 self.max_ticks_per_update = 100 self.tps = 10000 self.last_time = 0 self.passed_time = 0
Avatar
Need to do timer correctly
11:52 PM
For real ROM
11:52 PM
Otherwise you get boot loop
Avatar
also i wonder how do we emulate the shutdown correctly
11:57 PM
and how did user/lbphacker emulate the shutdown correctly
Avatar
Avatar
Delta
Otherwise you get boot loop
ah interesting
Avatar
my kbd code is broken :/
1:12 AM
0x8e00 doesnt seem to change
Avatar
Yay :)
1:22 AM
i stupid
1:25 AM
bad access 0:9838 bad access 0:9804 bad access 0:9805 bad access 0:9806 bad access 0:9807 bad access 0:9808 bad access 0:9809 bad access 0:980a bad access 0:980b bad access 0:980c bad access 0:980d bad access 0:980e bad access 0:980f bad access 0:9810 bad access 0:9811 bad access 0:9812 bad access 0:9813 (...)
1:25 AM
wtf
Avatar
src/tool8.py wrap_rom_emu --rom rom_emu.bin --face ~/Downloads/fx83gtplus-quality.png --dispx 66 --dispy 139 --dispscale 3 --gridfiles ignore/ag.bin --out roms/fx83_gtplus_emu.rom8 noting down command used to make the rom8
1:40 AM
something doesnt add up
Avatar
whats the r2 plugin for u8?
Avatar
how do i make diagnostic mode input work?
3:15 AM
mem: w 0f020 => 0x13 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x12 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x11 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x10 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0xf mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0xe mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0xd mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0xc mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0xb mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0xa mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x9 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x8 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x7 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x6 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x5 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x4 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x3 mem: w 0f021 => 0 mem: r 0f020 => 0 mem: r 0f021 => 0 mem: w 0f020 => 0x2 mem: w 0f021 => 0
3:15 AM
that seems like ki/ko sfrs heh
3:15 AM
what
3:20 AM
wait
3:20 AM
no
3:20 AM
thats my shit countdown code
4:23 AM
weird, for some reason test screen one draws this
4:23 AM
so the panel isn't actually 96 pixels? (edited)
4:23 AM
or (more likely) am i drawing too much of it
4:26 AM
also this one is weird
Avatar
i support putting the model into the window title now (edited)
5:18 AM
based on the model rom8 prop
5:18 AM
new more better fx83gt+ rom + tool8 (edited)
10.78 KB
Avatar
also hm it seems that curl isnt very happy with my website's tls certificates
5:28 AM
i think
5:29 AM
or something
5:29 AM
very weird
Avatar
Avatar
pitust
i support putting the model into the window title now (edited)
cool
Avatar
for now i'll just put the tool8 script in a directory on my repo
6:40 AM
in the future when pitust pushes i will switch to submodule
Avatar
@pitust in the tool8 script make sure to change run() to if __name__ == '__main__': run()
7:33 AM
(so i can import it)
Avatar
also what will happen if 2 compatible tags are used in one file? for now i'll just make it an error
8:29 AM
i will assume these keys are not mapped to any char
Avatar
ok i added partial support for rom8 (prop, rom, and facePNG) (edited)
8:57 AM
also is this correct? struct DisplayBounds { /* 0x00 */ uint16_t x; /* 0x02 */ uint16_t y; /* 0x04 */ uint16_t width; /* 0x06 */ uint16_t height; /* 0x08 */ uint16_t scale; } the tool8 script appears to write width and height first...
Avatar
also should mention that i had to add faceKeybinds to the ROM8Tag enums
Avatar
Avatar
Steveyboi
also what will happen if 2 compatible tags are used in one file? for now i'll just make it an error
invalid
Avatar
Avatar
Steveyboi
also is this correct? struct DisplayBounds { /* 0x00 */ uint16_t x; /* 0x02 */ uint16_t y; /* 0x04 */ uint16_t width; /* 0x06 */ uint16_t height; /* 0x08 */ uint16_t scale; } the tool8 script appears to write width and height first...
hmm
Avatar
Avatar
Steveyboi
also is this correct? struct DisplayBounds { /* 0x00 */ uint16_t x; /* 0x02 */ uint16_t y; /* 0x04 */ uint16_t width; /* 0x06 */ uint16_t height; /* 0x08 */ uint16_t scale; } the tool8 script appears to write width and height first...
no
3:21 PM
x, y, w, h
3:21 PM
oh wait
3:21 PM
yes
3:21 PM
wtff
3:21 PM
thats wrong
3:21 PM
hmm
5:44 PM
alr i bumped compatible to pitust,2
5:44 PM
changing nothing
Avatar
latest fx83gt+ emu rom8 and tool8
10.78 KB
6:21 PM
hmm
6:27 PM
how do i fix the AC break bug?
6:27 PM
apart from patching out ac break ofc (edited)
Avatar
if 8e00 is 2, then set it to 0 if AC is not being pressed
Avatar
if AC is being pressed, just leave it set
6:30 PM
works
6:30 PM
thanks!
6:31 PM
also why is it accessing 0x98xx (edited)
6:32 PM
hmm combined pc 0xb306
Avatar
meowcrocontroller 10/31/2023 6:35 PM
what is the ac break bug? I've seen it mentioned before
Avatar
Avatar
meowcrocontroller
what is the ac break bug? I've seen it mentioned before
if you enter VERIF or TABLE mode
6:35 PM
youll get AC break immediatly
Avatar
meowcrocontroller 10/31/2023 6:36 PM
oh, and what's the cause?
6:36 PM
Incomplete keyboard emulation?
Avatar
yes
6:36 PM
after stop 8E00H - 8E02H is reset to 0
6:37 PM
i found a fix after analyzing the emu AC check function
Avatar
meowcrocontroller 10/31/2023 6:38 PM
so the fix is to set it to 0 when exiting stop mode?
Avatar
if (ready == 2) { if (m_kc != 0x24) { core->wr(0x8e00, 0); m_ready = 0; return true; } }
6:38 PM
this is my fix
Avatar
meowcrocontroller 10/31/2023 6:38 PM
i hope this weekend I can connect a ps2 keyboard to the Pico
Avatar
Avatar
meowcrocontroller
so the fix is to set it to 0 when exiting stop mode?
yes
6:39 PM
and that is why VERIF works in my frontend
Avatar
and mine
7:21 PM
what new things are needed for cwi/real hw es
Avatar
different memory configuration
7:32 PM
i have a pinned message in #general-cw-x with the CWI memory map
7:33 PM
for real HW ES you need to make 8E00H to EFFFH read only
7:34 PM
and obviously emulate real KI and KO (i have pinned a message by delta explaining it)
7:34 PM
also you need to set F014H (IRQ0)
7:36 PM
or else kb won't work at all (edited)
Avatar
Avatar
Steveyboi
for real HW ES you need to make 8E00H to EFFFH read only
do they actually check 0x8e00 is ro?
Avatar
on real roms no
Avatar
Avatar
Steveyboi
and obviously emulate real KI and KO (i have pinned a message by delta explaining it)
ah i figured out ki/ko already
Avatar
have to go now
Avatar
for diagnostics
7:37 PM
thanks anyway
7:39 PM
oh also in-emu shutdown is done by doing write(0x8e00, 3)
7:42 PM
enum EmuRequest { GetKey = 1, ACBreak = 2, Shutdown = 3, ddSomething = 4, StartQR11 = 5, StopQR = 6, StartQR3 = 7, ACBreak2 = 8, };
Avatar
ah ic
Avatar
Avatar
pitust
enum EmuRequest { GetKey = 1, ACBreak = 2, Shutdown = 3, ddSomething = 4, StartQR11 = 5, StopQR = 6, StartQR3 = 7, ACBreak2 = 8, };
this thing right IM_EY.ES_STOP_GETKEY = 0x01 // �L�[�҂� IM_EY.ES_STOP_ACBREAK = 0x02 // AcBreak�`�F�b�N IM_EY.ES_STOP_DOOFF = 0x03 // OFF IM_EY.ES_STOP_DDOUT = 0x04 // DD �\�� IM_EY.ES_STOP_QRCODE_IN = 0x05 // QR Ver.11 �J�n�iURL�������Ă���j IM_EY.ES_STOP_QRCODE_OUT = 0x06 // QR �I�� IM_EY.ES_STOP_QRCODE_IN3 = 0x07 // QR Ver.3 �J�n�iURL�������Ă���j IM_EY.ES_STOP_ACBREAK2 = 0x08 // AcBreak�`�F�b�N <SRC_15270_ACBreakWithDD>
Avatar
bit sad that the japanese was fcked by utf-8
Avatar
Avatar
Steveyboi
this thing right IM_EY.ES_STOP_GETKEY = 0x01 // �L�[�҂� IM_EY.ES_STOP_ACBREAK = 0x02 // AcBreak�`�F�b�N IM_EY.ES_STOP_DOOFF = 0x03 // OFF IM_EY.ES_STOP_DDOUT = 0x04 // DD �\�� IM_EY.ES_STOP_QRCODE_IN = 0x05 // QR Ver.11 �J�n�iURL�������Ă���j IM_EY.ES_STOP_QRCODE_OUT = 0x06 // QR �I�� IM_EY.ES_STOP_QRCODE_IN3 = 0x07 // QR Ver.3 �J�n�iURL�������Ă���j IM_EY.ES_STOP_ACBREAK2 = 0x08 // AcBreak�`�F�b�N <SRC_15270_ACBreakWithDD>
in ESHardInformationCY.js (classpad) // ����STOP�����̃f�[�^ - What STOP Middle Data export const ES_STOP_GETKEY = 0x01 // �L�[�҂� - Waiting for keys export const ES_STOP_ACBREAK = 0x02 // AcBreak�`�F�b�N - ACBREAK check export const ES_STOP_DOOFF = 0x03 // OFF export const ES_STOP_DDOUT = 0x04 // DD �\�� - DD display export const ES_STOP_QRCODE_IN = 0x05 // QR Ver.11 �J�n�iURL�������Ă���j- QR Ver.11 start (URL also comes in) export const ES_STOP_QRCODE_OUT = 0x06 // QR �I�� - QR end export const ES_STOP_QRCODE_IN3 = 0x07 // QR Ver.3 �J�n�iURL�������Ă���j- QR Ver. 3 start (URL comes in) export const ES_STOP_ACBREAK2 = 0x08 // AcBreak�`�F�b�N <SRC_15270_ACBreakWithDD> - ACBREAK check
9:18 PM
hmm
9:18 PM
TIME_WAIT = 0.125
Avatar
crap how do i fcking clone
9:25 PM
i want to add submodule
Avatar
you need to add an ssh key
9:27 PM
dont submodule the whole thing tho
9:27 PM
is the only thing you want tool8?
Avatar
ya
9:27 PM
so just put it in the repo instead
9:27 PM
of submodule
9:28 PM
submodule this
Avatar
i added another tool
9:36 PM
its called romangle
9:36 PM
it turns faces and rom dumps into rom files
Avatar
cool!
9:45 PM
they should be complete
9:45 PM
but they use svg not png faces
Avatar
oh...svg...
9:46 PM
let's see if pygame supports SVG
9:46 PM
yeah alright it does
Avatar
do the interface bars differ?
9:46 PM
oh yeah the svgs i have are mildly cursed
9:47 PM
i use python str.replace to scale them up :^) (edited)
9:49 PM
here is the latest rom8
Avatar
try CY000 now
Avatar
CY000?
9:51 PM
i dont have the rom or face
Avatar
meowcrocontroller 10/31/2023 9:53 PM
Is there rom8 support in the latest commit of the frontend?
9:53 PM
coo
Avatar
Avatar
meowcrocontroller
Is there rom8 support in the latest commit of the frontend?
yes
9:54 PM
also just pushed
9:54 PM
added more support
Avatar
cool!
9:55 PM
because if it is that doesnt work
Avatar
nope its not
9:55 PM
LMAO
9:55 PM
:/
Avatar
hmm i think you need account
9:56 PM
maybe
9:56 PM
whats the classpad link
Avatar
classpad removed CY000
Avatar
Avatar
Steveyboi
added more support
meowcrocontroller 10/31/2023 9:56 PM
oh, i am gettting an assertion error
Avatar
wtf
Avatar
can you send the assets directly then?
Avatar
ah here
96.85 KB
9:57 PM
happysheep sent it to me long time ago
9:57 PM
includes face.html and face.svg
Avatar
Avatar
Steveyboi
wtf
meowcrocontroller 10/31/2023 9:57 PM
assert pay == SUPPORTED_ROM8
Avatar
Avatar
meowcrocontroller
assert pay == SUPPORTED_ROM8
bad rom8 file
9:58 PM
you need a pitust,2 rom8
Avatar
can you re-add support for pitust,1?
Avatar
(new version with exciting features like the implementation is consistent)
Avatar
meowcrocontroller 10/31/2023 9:58 PM
oh ok, i was trying the ones from the list on your site
Avatar
Avatar
Steveyboi
can you re-add support for pitust,1?
(just for compatibility)
Avatar
ah sure
9:59 PM
oh right so the issue is
9:59 PM
pitust,1 rom8s are broken
9:59 PM
they wont work correctly
Avatar
Avatar
pitust
bad rom8 file
meowcrocontroller 10/31/2023 9:59 PM
still same assertion error
Avatar
Avatar
pitust
grab this one
meowcrocontroller 10/31/2023 9:59 PM
with this
Avatar
show traceback
Avatar
ah yeah doesnt matter that asserts the rom8 compatible is correct
Avatar
meowcrocontroller 10/31/2023 10:00 PM
Traceback (most recent call last): File "C:\Users\user\Desktop\casio\u8-emu-frontend\main.py", line 1467, in <module> sim = Sim() File "C:\Users\user\Desktop\casio\u8-emu-frontend\main.py", line 799, in __init__ tags = list(tool8.read8(config.rom_file)) File "C:\Users\user\Desktop\casio\u8-emu-frontend\tool8\tool8.py", line 68, in read8 assert pay == SUPPORTED_ROM8 (edited)
Avatar
bro put it in code block 💀
Avatar
meowcrocontroller 10/31/2023 10:01 PM
oh, i didnt?
Avatar
triple backticks for multiline
Avatar
meowcrocontroller 10/31/2023 10:01 PM
yea accidentally hit esc instead of `
10:01 PM
lol
10:01 PM
sorry
Avatar
you do this: ```
10:02 PM
and then you dont need one for every line
10:02 PM
and it looks nicer
Avatar
Avatar
meowcrocontroller
Traceback (most recent call last): File "C:\Users\user\Desktop\casio\u8-emu-frontend\main.py", line 1467, in <module> sim = Sim() File "C:\Users\user\Desktop\casio\u8-emu-frontend\main.py", line 799, in __init__ tags = list(tool8.read8(config.rom_file)) File "C:\Users\user\Desktop\casio\u8-emu-frontend\tool8\tool8.py", line 68, in read8 assert pay == SUPPORTED_ROM8 (edited)
wait, line 68?
10:02 PM
that appears to be the old version
10:02 PM
try re-pulling
Avatar
meowcrocontroller 10/31/2023 10:03 PM
i did
Avatar
hmm that's weird
Avatar
meowcrocontroller 10/31/2023 10:03 PM
oh wait
10:03 PM
shit
10:03 PM
i didnt
Avatar
yeah check if the tool8 folder is a submodule (edited)
10:04 PM
because that's the latest version
Avatar
meowcrocontroller 10/31/2023 10:04 PM
yea ok, now it works
10:04 PM
sorry bout that
Avatar
i realized my AC bug fix isn't very elegant
Avatar
i added support for reading rom8s with different compatibles
Avatar
submodule updated
Avatar
and a cat command that lets you merge (and update) rom8 files (edited)
Avatar
Avatar
Steveyboi
i realized my AC bug fix isn't very elegant
the issue is that other keys except AC also gets treated as AC press, but ehhhhh if it works it works ig
Avatar
cringe
10:08 PM
i have a real ac break fix
Avatar
but mine is more accurate to the official emulator ¯\_(ツ)_/¯
10:10 PM
i could probably add a flag telling the frontend what key is AC
10:10 PM
but ehhhh
10:10 PM
it works fine if you ignore the "non-AC keys are treated as AC" thing
Avatar
AC is 0x24 always no?
Avatar
nope
Avatar
oh wait...
Avatar
hmm
Avatar
anyway you can parse faceKeymap
10:11 PM
and look for [AC]
10:11 PM
or AC
Avatar
it is always 0x24...
10:12 PM
...coincidence?????
10:12 PM
maybe, maybe not (edited)
Avatar
Avatar
Steveyboi
...coincidence?????
no
10:12 PM
the basic keyboard is always the same
10:12 PM
basic keyboard as in 0-9 +-*/ EXE or = (edited)
Avatar
btw my frontend has a "use keyboard sfrs" feature for emu rom mode
10:47 PM
allows you to access diagnostic on emu roms with ease
Avatar
i just always drive keyboard sfrs
Avatar
then you're basically like user ^_^
Avatar
Avatar
Steveyboi
then you're basically like user ^_^
why
10:49 PM
its easier that way
10:49 PM
its like what two lines of code (edited)
10:49 PM
c++ if (kc == 0xff) { KI(core, 0); } else { if (KO(core) & ko) { KI(core, ki); } else { KI(core, 0); } }
Avatar
whatever
Avatar
I see very little disadvantage to it
Avatar
hmm ok
10:54 PM
ok i removed the use keyboard sfrs setting in my frontend
10:54 PM
it now always uses keyboard sfrs
10:54 PM
no more toggle
10:54 PM
much better rite
11:01 PM
also i fixed AC break thing again
Avatar
is the screen on cwi (and gt+) 31 lines tall?
1:28 AM
kinda weird..
1:32 AM
with 32 the whole rectangle is drawn...
Avatar
Avatar
pitust
is the screen on cwi (and gt+) 31 lines tall?
Yeah
1:42 AM
32 rows
1:42 AM
First is status bar tho
1:44 AM
This is all the docs we have
1:44 AM
Is good tho
Avatar
alr so im not quite clear on the memory layout
1:51 AM
wonderful, heap buffer overflow in rom8 parsing
1:52 AM
and now out of bounds write in face code
1:52 AM
ohhhh
1:54 AM
alr
1:54 AM
now im no longer crashing
1:54 AM
because i handle lacking face data in my gfx code now
1:57 AM
now all i have is black screen and memory errors
1:57 AM
bad access 4:9838
1:57 AM
what does that mean lol
1:57 AM
as in
1:57 AM
why
1:57 AM
is keyboard stuff in segment 4 now
2:00 AM
alr time to pclog
2:03 AM
how do i disasssemble the CY000 rom
2:03 AM
pyu8disas no like
2:03 AM
and i dont really trust my disassembler that much
2:03 AM
and also id have to kludge up something
2:08 AM
okay i now have a disassembly that is somehow even worse than pyu8disasm's output
2:09 AM
bad access seems to be pc 0x1d28a
2:10 AM
1:d28a dsr.r r0 1:d28c st r1, [er12]
2:10 AM
okay at least it looks like valid disasm
2:12 AM
er12 is [er14 + 0xfff8]
Avatar
The radare2 plugin works well
2:18 AM
And produced nice graphs in visual mode
Avatar
Avatar
Delta
The radare2 plugin works well
radare2 plugin?
Avatar
link?
Avatar
radare2 plugins for nX-U8/100. Contribute to Fraserbc/u8_r2_plugin development by creating an account on GitHub.
2:20 AM
the upstream was broken
Avatar
Yeah no I fixed it
2:21 AM
Or did atleast, haven't updated my r2 in a while
2:21 AM
works! (edited)
2:22 AM
Love it when things work out of the box (edited)
2:22 AM
The r2 api changes quite a bit, so I'm surprised
Avatar
where is the entrpoint in the rom
Avatar
Have to parse the reset vector
2:24 AM
iaito isnt super happy with the rom
Avatar
Iaito?
2:26 AM
iaito is the official graphical interface for radare2, a libre reverse engineering framework.
Avatar
Ah yeah, it's a tad fucky
Avatar
its a lot happier now that i set the isa to u8 :^)
2:33 AM
okay very nice thanks
Avatar
Avatar
pitust
its a lot happier now that i set the isa to u8 :^)
Ah lol, that'll do it
3:24 AM
Also I think there are some small bugs in it
3:24 AM
Can't remember
3:24 AM
Possibly two instructions are switched?
Avatar
Avatar
pitust
is the screen on cwi (and gt+) 31 lines tall?
CWI is 64 rows
6:15 AM
gotta fix my rom8s then
6:15 AM
fun
Avatar
aw hell naw, very broken things here
6:32 AM
(i'm testing the CY000 emu rom8)
Avatar
after spending like 30 minutes (maybe?) getting cairosvg working on windows (edited)
8:18 AM
@pitust
Avatar
ok i think i added full support for rom8 now
Avatar
Avatar
Steveyboi
after spending like 30 minutes (maybe?) getting cairosvg working on windows (edited)
GammaVelorum 11/1/2023 8:51 AM
are u still using pygame or something
8:51 AM
cant you like render the svg into a png
8:52 AM
or use one of the pictures i ripped
Avatar
The Administrator 11/1/2023 9:03 AM
beucalc v0.4 build 3
Avatar
nice
9:03 AM
what have you added
Avatar
Avatar
Steveyboi
what have you added
The Administrator 11/1/2023 9:03 AM
a dirty fix for the emu rom acbreak
Avatar
i hope its a good fix
Avatar
The Administrator 11/1/2023 9:04 AM
it seems to work but the implementation is most likely inaccurate also i added support for 0F044h inverted KO (edited)
Avatar
Avatar
GammaVelorum
cant you like render the svg into a png
i mentioned cairosvg in the next post
9:05 AM
it has an svg2png function
Avatar
GammaVelorum 11/1/2023 9:31 AM
i mean couldnt you render the svg into a png in another program and just tell the emulator to draw the png
Avatar
its because of the rom8
9:46 AM
i used the rom8 on pitusts website
9:46 AM
and it has svg instead of png data
9:47 AM
obviously if i wasn't using rom8 i could have used (and do use) png images
Avatar
meowcrocontroller 11/2/2023 5:04 PM
Fraser Price has coded U8 Emu, an emulator for the nX-U8/100 ISA, specifically for emulating Casio calculators. The nX-U8/100 is an 8-bit microcontroller made by ROHM in Japan. You can see the GNU …
5:04 PM
Delta got featured on the Adafruit blog
5:05 PM
is this a dmca risk?
Avatar
huh
5:23 PM
uh oh
5:24 PM
probably fine if it doesn't mention casio on the repo
Avatar
also it has a picture of chinese spelling on fx-991CN X, just amazing
Avatar
Woah ok
5:58 PM
That's kinda cool ngl
5:59 PM
Should I add a discord link to here? (edited)
Avatar
yeah sure why not
6:08 PM
also link to my frontend ^_^
Avatar
meowcrocontroller 11/2/2023 6:32 PM
But the repo does mention Casio
Avatar
I'm not worried about casio for that repo
6:33 PM
OKI maybe
6:33 PM
none of casio's copyrighted stuff is in there
Avatar
Yukidamayaki 11/3/2023 4:59 AM
Haha, who chose those characters
4:59 AM
It's literally "Hentai"
Avatar
var boards in var board in var ident 0x05 var romSegments 0x2 var mapOld nil var sfr in const REG_BASE 0x8e00 var pvReq REG_BASE + 0 var pvKI REG_BASE + 1 var pvKO REG_BASE + 2 end end var board in var ident 0x06 var romSegments 0x4 var mapCW nil var sfr in const REG_BASE 0x48e00 var pvReq REG_BASE + 0 var pvKI REG_BASE + 1 var pvKO REG_BASE + 2 end end end
6:28 AM
rate my new configuration language
6:33 AM
alr time to handle reset/on
6:33 AM
is the only thing needed to do a u8_reset?
Avatar
Avatar
Yukidamayaki
It's literally "Hentai"
🤨
6:41 AM
how do i do CWII
Avatar
Avatar
pitust
is the only thing needed to do a u8_reset?
yeah ig
Avatar
okay cool
6:41 AM
i have working ON
Avatar
in the docs for BRK it also mentions intitializing all registers
6:41 AM
but doesn't say what value exactly
Avatar
yea definitely 0
Avatar
u8_reset does that anyway (edited)
Avatar
wait it does that now? guess i'll remove my register init code
6:43 AM
but later
Avatar
anyway
6:43 AM
what do i need for CWII
Avatar
have to go to school
Avatar
Avatar
pitust
what do i need for CWII
ROM window is 0x9000 bytes
6:43 AM
r/w segment is segment 8
Avatar
8 only?
Avatar
segments 1-7 are copied from code
Avatar
Avatar
pitust
8 only?
yea
6:44 AM
so mapCWII i guess
6:44 AM
and i guess paravirt is 8:8e00
Avatar
yup
Avatar
but its probably not the same on real hw because checksum calculation code uses segment 8
6:46 AM
which one is the "best" (all features) EY? (edited)
Avatar
theres currently nothing like that yet
6:48 AM
you can just use sth like fx-83GT CW emu rom or sth
Avatar
ill just grab a random rom then
6:48 AM
cool
6:49 AM
oh lol of course even bigger mask rom
Avatar
also the version isn't at the end of the rom anymore
6:57 AM
its at 7:1FEEH iirc
Avatar
and where is the rest of segment 0 mapped? (edited)
7:06 AM
7:06 AM
cool
7:06 AM
no face
7:06 AM
but like
7:06 AM
fine
Avatar
Avatar
pitust
and where is the rest of segment 0 mapped? (edited)
currently... we don't know
Avatar
incredible
Avatar
also CWII screen is actually 4BPP
Avatar
4bpp?
7:07 AM
wait what
Avatar
yes
Avatar
so they have colors?
7:08 AM
or well
7:08 AM
shades of gray
Avatar
yea
Avatar
the screen data at F800H are the low bits
Avatar
there is another area at 8:9000H that holds the high bits (edited)
Avatar
of course!
7:08 AM
this is totally not a mess
Avatar
Avatar
Steveyboi
there is another area at 8:9000H that holds the high bits (edited)
isn't that in the ram area...
Avatar
yea
7:09 AM
it is
Avatar
so now they dma from ram
7:09 AM
beautiful
7:09 AM
absolutely fucking great system
7:09 AM
anyway
7:09 AM
hmm
7:09 AM
this means i need new face code
7:09 AM
my current code assumes monochrome
7:10 AM
it assumes lots of stuff
7:11 AM
alr pushed
7:11 AM
partial support (edited)
7:11 AM
no shading, that requires changes to graphics code to make it handle 4bpp
7:11 AM
wait
7:11 AM
is it 4 BPP or 2 BPP
7:11 AM
so 2 bits 4 colors or 4 bits 16 colors
7:12 AM
screen_data = [[(2 if scr_bytes_hi[1+i][j] & (1 << k) > 0 else 0) + (1 if scr_bytes_lo[1+i][j] & (1 << k) else 0) for j in range(0x18) for k in range(7, -1, -1)] for i in range(63)]
7:12 AM
this is not readable sorry
7:12 AM
and im an expert in unreadable code i mean i wrote c++ map(0x0'0000, 0x0'd000, rom + 0x0'0000, component::MapType::ROData); map(0x0'd000, 0x0'3000, mem + 0x0'0000, component::MapType::Data); map(0x1'0000, 0x1'0000, rom + 0x1'0000, component::MapType::ROData); map(0x2'0000, 0x1'0000, rom + 0x2'0000, component::MapType::ROData); map(0x3'0000, 0x1'0000, rom + 0x3'0000, component::MapType::ROData); map(0x4'0000, 0x1'0000, mem + 0x1'0000, component::MapType::Data); map(0x5'0000, 0x1'0000, rom + 0x0'0000, component::MapType::ROData);
7:12 AM
where map is a macro
Avatar
Avatar
pitust
so 2 bits 4 colors or 4 bits 16 colors
ok 2BPP i mistake
Avatar
Avatar
pitust
Click to see attachment 🖼️
Is that ImGUI?
2:19 PM
its sdl (edited)
Avatar
okay time to do error handling maybe
Avatar
vngithubdev 11/4/2023 11:07 PM
which python library to simulate casio calculator?
11:07 PM
i'm starting to code my own emulator
Avatar
Avatar
vngithubdev
which python library to simulate casio calculator?
there is no python library
11:19 PM
but there is a C library
Avatar
Avatar
Steveyboi
there is no python library
vngithubdev 11/4/2023 11:20 PM
what is it?
Avatar
Avatar
vngithubdev
i'm starting to code my own emulator
I would be happy to help if you would decide to write (in python) wrapper around SimU8.dll instead of writing everything from ground up.
Avatar
vngithubdev 11/4/2023 11:25 PM
i can code tkinter gui
11:26 PM
but i dont know how to emulate the calculator
Avatar
Avatar
a.mnemonic
I would be happy to help if you would decide to write (in python) wrapper around SimU8.dll instead of writing everything from ground up.
iirc you can't use CDLL to import the library
Avatar
Avatar
vngithubdev
but i dont know how to emulate the calculator
use my frontend as reference
11:31 PM
use delta's c core
Avatar
Avatar
Steveyboi
iirc you can't use CDLL to import the library
You can
11:31 PM
In theory
11:31 PM
But will be quite annoying
11:31 PM
And you will have to reverse engineer the structs I think
Avatar
there is not much structs used in exported functions, mostly buffer to load firmware and callback to redraw screen
Avatar
hmm lemme boot up my laptop to test
Avatar
I'm doing this in object pascal, i have written proxy dll to see what is happening and inject my code etc
Avatar
do you have it on github?
Avatar
if you have 64 bit python then you have problem
Avatar
oh come on =(((
Avatar
rename SimU8.dll to Real_SimU8.dll and thne place this one instead
11:37 PM
code is not public yet, but is very simple for example detection of model:
Avatar
hmm in the future can you add support for 2.10.1.0
Avatar
i think it supports all versions
Avatar
nope
Avatar
also you can put empty file casio.log in same directory as DLL and then orginal dll will log all cpu steps
Avatar
Avatar
Steveyboi
nope
oook 😄 have to look at this
Avatar
Avatar
a.mnemonic
also you can put empty file casio.log in same directory as DLL and then orginal dll will log all cpu steps
oh that's the log feature that user mentioned?
11:40 PM
i thought it logs to console lol
11:41 PM
i use fx-570VN+ emulator which is LY710X VerA
Avatar
but looks like it uses memory model like in ES PLUS 😛
Avatar
also ES ROM is also 0x20000 bytes...
Avatar
yes, that is true, but emulator request 0x30000 bytes of memory from library
11:44 PM
maybe that is bug, maybe feature
Avatar
i wonder what happens in diagnostic
11:47 PM
time to jump to it
Avatar
it simulate Shift+7
11:48 PM
after enabling you have to press ON on emulator
11:48 PM
then standard procedure
11:48 PM
until.... fw should be seen 😄
11:48 PM
then I don't know but it is empty screen
Avatar
yeah ik that problem
11:49 PM
6502 vibes...
11:49 PM
wam
11:49 PM
it doesn't set CSR
11:49 PM
nooooo
11:50 PM
diagnostic in fx-570VN+ is in segment 1
11:50 PM
rip
11:52 PM
also my stupid brain thought this was some debug mode
11:53 PM
would've noticed it if it said diagnostic mode instead
11:58 PM
also KI/KO filter fails on CWI
Avatar
yes, it seems that they remaped HW I/O mapping littlebit in classwizz or maybe rather it should be masked with 0xFFFF
Avatar
on classwiz the KI/KO location is in segment 4
12:04 AM
on fx-82SOLAR II its mapped to E800H
12:05 AM
and on CWII its in segment 8
12:06 AM
@a.mnemonic
12:06 AM
incorrect calc detection
12:09 AM
also can you add ROM injection? (edited)
Avatar
hmm... yes, Ican try. In meantime you can catch v0.2 with added SetPeriBCD export for compatibility with newest SimU8.dll
Avatar
also classwiz 2 is EY
12:14 AM
wait i just realized
12:14 AM
MaxAddrCode
12:14 AM
delta's rom dumper can use this
Avatar
yes, that are addressed accessed by emulator when writing binary into memory
Avatar
if the addresses are written into the CSimU8core object itself then its a win-win
12:16 AM
or else we'll just have to use the tried and true "dump to last non-empty segment" method for emu rom dumping
12:17 AM
oh wait why tf do i have to care about delta's dumper
12:17 AM
there is a dump feature right in the proxy
Avatar
yes it is
12:19 AM
nevertheless it uses sizes requested by SetCodeMemorySize which as you said before not always are accurate.
Avatar
you can just use that MaxAddrCode address
12:20 AM
save it to a variable
12:20 AM
and use that for rom dump
12:22 AM
anyways i go sleep now
12:22 AM
tomorrow ig i'll try to implement interrupts into my frontend
Avatar
Avatar
a.mnemonic
hmm... yes, Ican try. In meantime you can catch v0.2 with added SetPeriBCD export for compatibility with newest SimU8.dll
The Administrator 11/5/2023 7:16 AM
is SetPeriBCD related to the 0F4XXh stuff on cwii? (edited)
Avatar
it is also used in the web emulator (edited)
7:59 AM
the line that calls SetPeriBCD(1) has a comment that says enable BCD support
8:00 AM
we currently don't know if that is related to those F4xxH SFRs yet
Avatar
now i wanna use the proxy combined with cheat engine, and that does not work because the filename is changed
12:03 PM
sad :(
Avatar
this is the SetPeriBCD wasm function (i got it from chrome devtools) (func $Q (;377;) (export "Q") (param $var0 i32) (result i32) (local $var1 i32) (local $var2 i32) i32.const 26840 (; 0x68D8 ;) i32.load8_u i32.const 0 i32.ne i32.const 26844 (; 0x68DC ;) i32.load i32.const -1 i32.ne i32.and if (result i32) i32.const 24 local.set $var2 block $label2 block $label0 block $label1 local.get $var0 br_table $label0 $label1 $label2 end $label1 i32.const 1 local.set $var1 end $label0 i32.const 24104 (; 0x5E28 ;) local.get $var1 i32.store8 i32.const 0 local.set $var2 end $label2 local.get $var2 else i32.const -1 end ) (edited)
Avatar
it seems that there are two asm commands: DAA Rn and DAS Rn and that is really all in documentation having BCD in text
DAA Rn - This instruction converts the contents of the specified byte-sized register into a binary coded decimal (BCD) value by adding the appropriate value, based on the contents of the register as well as the C and HC flags, from the following Table.
DAS Rn - This instruction converts the contents of the specified byte-sized register into a binary coded decimal (BCD) value by subtracting the appropriate value, based on the contents of the register as well as the C and HC flags, from the following Table.
Avatar
but "Peri"? Wtf. Maybe Peripherals? But then BCD doesn't make sense much
2:09 AM
Also I like how some debug information was left inside emulator itself:
The input file was linked with debug information and the symbol filename is: "C:\909_Series\Classwiz2\pc\Release_USB_Ey006\ClassWizEmulator.pdb"
Avatar
Has anyone looked at these yet?
2:31 AM
From the U8 dev kit iso
2:34 AM
seems to be a part of DTU8
2:37 AM
oh wow ok
2:37 AM
those export many more symbols
2:38 AM
they are worth looking into (edited)
Avatar
long time ago I tried to simply replace SimU8.dll and SimU8engine.dll to these from SDK but it didn't worked at all
Avatar
is it importing by ordinal maybe?
2:50 AM
if you swapped those correctly it might
Avatar
emulator have static imports from these libs by name so i think it is something else
Avatar
Avatar
a.mnemonic
long time ago I tried to simply replace SimU8.dll and SimU8engine.dll to these from SDK but it didn't worked at all
did it crash and close or just hang?
2:53 AM
what about replacing only one of them
Avatar
I don't remember. It was few years ago and I din't pursued this possibility any more 🙂
Avatar
Avatar
a.mnemonic
but "Peri"? Wtf. Maybe Peripherals? But then BCD doesn't make sense much
thats what i thought it is
5:53 AM
this._SetPeriBCD(1); // enable BCD support
5:54 AM
so SetPeriBCD controls the presence of DAA and DAS?
Avatar
No, because they exist in all the roms
Avatar
Avatar
Delta
Has anyone looked at these yet?
wow interesting
6:27 AM
6:28 AM
this one appears to be a... special version of some kind
6:29 AM
5.0.100.0
Avatar
look at it in IDA/dissasembler of choice
6:29 AM
look at what's exported
6:29 AM
SimU8engine too
Avatar
you know its different when you see a different DLL being used
6:33 AM
this is probably a debug version of SimU8
6:33 AM
it's used in DTU8 I think
Avatar
casio most likely didn't use it in any of their emulators, probably even private ones
Avatar
it appears to have functions for probably every U8 instruction
6:42 AM
also found this /* private: void __thiscall CSimU8main::nmice_int(unsigned short,int) */ void __thiscall CSimU8main::nmice_int(CSimU8main *this,ushort param_1,int param_2) { /* 0x1497 145 ?nmice_int@CSimU8main@@AAEXGH@Z */ switch(param_2) { case 0: *(undefined4 *)(this + 0x20a8) = 1; *(undefined4 *)(this + 0x21f4) = 1; *(undefined4 *)(this + 0x2190) = 1; *(undefined4 *)(this + 0x2244) = 1; *(undefined4 *)(this + 0x2204) = 1; *(undefined4 *)(this + 0x22bc) = 1; *(undefined4 *)(this + 0x22c0) = 1; *(undefined4 *)(this + 0x20b0) = 0; return; case 1: *(undefined4 *)(this + 0x2128) = 1; *(undefined4 *)(this + 0x2160) = 1; *(undefined4 *)(this + 0x20b0) = 0; return; case 2: *(undefined4 *)(this + 0x21dc) = 1; *(undefined4 *)(this + 0x21f8) = 1; *(undefined4 *)(this + 0x2190) = 1; *(undefined4 *)(this + 0x2240) = 1; *(undefined4 *)(this + 0x2250) = 1; break; case 3: *(undefined4 *)(this + 0x20d8) = 1; *(undefined4 *)(this + 0x20ac) = 1; break; default: goto switchD_10015fef_exit; } *(undefined4 *)(this + 0x2168) = 1; *(undefined4 *)(this + 0x20b0) = 0; switchD_10015fef_exit: return; }
6:42 AM
since we know how NMICE works (ig?) i think we can decompile this very easily
Avatar
it would be nice to reverse engineer this
6:42 AM
figure out all the fields
Avatar
hmm NMICE is not talked about in U8 manual (edited)
6:45 AM
only NMI
Avatar
non maskable in circuit emulator interrupt
Avatar
Avatar
Steveyboi
hmm NMICE is not talked about in U8 manual (edited)
also it is?
6:46 AM
1.3.2.2.1
Avatar
i meant it doesn't say NMICE operation
Avatar
well yeah, because that will be implementation dependant
Avatar
well i found a function for SWI
6:49 AM
time to decompile it
6:51 AM
ok actually i have no idea wtf is going on here /* private: void __thiscall CSimU8main::software_int(unsigned short,int) */ void __thiscall CSimU8main::software_int(CSimU8main *this,ushort param_1,int param_2) { /* 0x187f 149 ?software_int@CSimU8main@@AAEXGH@Z */ if (param_2 == 0) { *(undefined4 *)(this + 0x20a8) = 1; *(undefined4 *)(this + 0x2180) = 1; *(undefined4 *)(this + 0x21b8) = 1; *(undefined4 *)(this + 0x21f4) = 1; *(undefined4 *)(this + 0x2244) = 1; *(undefined4 *)(this + 0x22ac) = 1; *(undefined4 *)(this + 0x2204) = 1; *(undefined4 *)(this + 0x22b0) = 1; } else { if (param_2 != 1) { if (param_2 != 2) { return; } *(undefined4 *)(this + 0x2168) = 1; *(undefined4 *)(this + 0x20d8) = 1; *(undefined4 *)(this + 0x20ac) = 1; *(undefined4 *)(this + 0x20b0) = 0; return; } *(undefined4 *)(this + 0x2168) = 1; *(undefined4 *)(this + 0x2248) = 1; *(undefined4 *)(this + 0x21dc) = 1; *(undefined4 *)(this + 0x21f8) = 1; *(undefined4 *)(this + 0x2240) = 1; } *(undefined4 *)(this + 0x2190) = 1; *(undefined4 *)(this + 0x20b0) = 0; return; }
Avatar
The Administrator 11/7/2023 10:34 AM
i suspect that SetPeriBCD is related to the 0F4XXh stuff
Avatar
Avatar
pitust
this._SetPeriBCD(1); // enable BCD support
The Administrator 11/7/2023 10:34 AM
i suspect that SetPeriBCD is related to the 0F4XXh stuff
Avatar
to know for sure we have to decompile the function in SimU8engine.dll
10:46 AM
and also RE the CSimU8core object structure
Avatar
SetPeriBCD in SimU8engine.dll 2.10.1.0 (code from ghidra): int __thiscall CSimU8core::m_SetPeriBCD(CSimU8core *this,char enable) { /* 0x40d0 41 ?m_SetPeriBCD@CSimU8core@@QAEHE@Z */ if (enable == '\0') { (**(code **)(*(int *)(this + 0x80) + 8))(0); return 0; } if (enable == '\x01') { (**(code **)(*(int *)(this + 0x80) + 8))(1); return 0; } return 0x18; } (edited)
Avatar
hmm it actually ends up jumping to this function void set_peri_bcd(CSimU8core *this,int enable) { this[4] = enable._0_1_; return; }
Avatar
vngithubdev 11/7/2023 11:11 PM
beucalc bug
Avatar
yes
11:12 PM
CWII is much harder to emulate correctly
Avatar
vngithubdev 11/7/2023 11:12 PM
coded in java
Avatar
yea
11:13 PM
ik
Avatar
Avatar
vngithubdev
beucalc bug
The Administrator 11/7/2023 11:21 PM
i suspect cwii uses some sort of dedicated hardware mapped to 0F4XXh for calculations
Avatar
vngithubdev 11/7/2023 11:33 PM
yep
Avatar
Avatar
The Administrator
i suspect cwii uses some sort of dedicated hardware mapped to 0F4XXh for calculations
a BCD peripheral of sorts, perhaps?
Avatar
probably
Avatar
okay so hmm
11:45 PM
for some reason the rom8s on my website dont have attached faces
Avatar
wdym they do...
Avatar
oh not the cwii ones
Avatar
ohhhh
Avatar
they are there on disk tho
11:46 PM
weird
11:47 PM
sounds like tool8 bug
11:49 PM
ah its probs more special cases in scaling code
11:49 PM
width="367" LOL WHAT
11:49 PM
can they pick a consistent fucking size (edited)
11:50 PM
fine ill figure out scaling again
Avatar
Avatar
The Administrator
i suspect cwii uses some sort of dedicated hardware mapped to 0F4XXh for calculations
vngithubdev 11/8/2023 12:34 AM
i don't think so
12:36 AM
no hw changes between fx-580vnx and fx-880btg
12:38 AM
i think because the rom
Avatar
alr so my timer code was pretty crap
12:38 AM
they totally enter STOP mode when calculating though??
12:39 AM
PC 046a4 r 0x0f042 (1: 00) PC 046ac w 0x0f024 (2: 0f) PC 046b2 w 0x0f022 (2: 00) PC 046c0 w 0x0f025 (1: 01) PC 04670 w 0x0f024 (2: 01) PC 04676 w 0x0f022 (2: 00) PC 04680 w 0x0f025 (1: 01)
12:39 AM
normal stop
12:39 AM
PC 0469c r 0x0f046 (1: 00) PC 0469c w 0x0f040 (1: ff) PC 046a4 r 0x0f042 (1: 00) PC 046ac w 0x0f024 (2: 0f) PC 046b2 w 0x0f022 (2: 00) PC 046c0 w 0x0f025 (1: 01) PC 1d232 w 0x0f037 (1: 00) PC 1d22a w 0x0f037 (1: 04) PC 1d232 w 0x0f037 (1: 00) PC 1d22a w 0x0f037 (1: 04) PC 1d232 w 0x0f037 (1: 00) PC 1d22a w 0x0f037 (1: 04) PC 04670 w 0x0f024 (2: 01) PC 04676 w 0x0f022 (2: 00) PC 04680 w 0x0f025 (1: 01)
12:39 AM
first stop
12:44 AM
hmm i wonder
12:44 AM
we have ccu8 right
Avatar
yea
Avatar
can we just make a test rom
12:44 AM
and run it in the official emu
Avatar
problem is there's no assembler
Avatar
Avatar
Steveyboi
problem is there's no assembler
the macu8 tools are... weird
12:45 AM
i tried to compile a test ASM with it
12:45 AM
it... ended up outputting intel hex which translated to garbage
Avatar
what is rasu8
Avatar
part of macu8
Avatar
RASU8 Relocatable Assembler, Ver.1.80
12:45 AM
i see
Avatar
here i used this to test RASU8
119 bytes
Avatar
thanks
Avatar
also make sure to change the TYPE directive
12:46 AM
i used a DCL that user provided
Avatar
have you tried the ccu8 compilation driver
Avatar
no i haven't
Avatar
can you send the DCL?
Avatar
its in user's U8DevTool repo
12:49 AM
in DTU8_tools
Avatar
Avatar
Steveyboi
problem is there's no assembler
is your assembler not working?
2:00 AM
mine is like 50% of the way there (edited)
Avatar
okay wtf
2:25 AM
i tried downloading simlib
2:26 AM
straight from caduo
2:26 AM
and running it in nodejs
Avatar
oh huh
3:07 AM
i noticed something about branches
3:08 AM
the branches are always arranged branch on X then branch on not X
3:09 AM
also huh
3:10 AM
so this store sequence will run if [0xf042] is zero after leaving STOP (edited)
Avatar
alr so (edited)
3:28 AM
writes of 0x8c, 0x88, 0x84 and 0x80 to 0x0f400 encode 0x900e and 0x900f
3:29 AM
the value at 0x900e seems to encode input length * 11 + 0x202 (edited)
3:30 AM
input length in screen characters, not in input characters
3:30 AM
so cos( is 4
3:30 AM
and cos-1( is 5
3:30 AM
this works for non mathio ig
3:31 AM
hmm did they implement all math in hardware lol
3:32 AM
ah no
3:32 AM
its the CURSOR location
3:32 AM
ohh
3:33 AM
i think 0xf400 is for hw cursor drawing
3:34 AM
its hw cursor X i think
3:34 AM
+ 0xca?
3:35 AM
wait
3:35 AM
thats the LAST value that lands there
3:35 AM
900f is just a temp wait fuck nvm
Avatar
okay so the precision is 13 (14?) digits on the actual calc (edited)
Avatar
0x0f480 and 0x0f488 are used for writing number data im pretty sure
Avatar
Avatar
pitust
is your assembler not working?
has no branch and jump implemented and no labels
7:03 AM
other than that its decent (edited)
Avatar
lol my emulator has so much c++ and templates defconfig is 10 seconds on my potato laptop
3:57 PM
things that build "quickly":
  • u8core
  • 30 line template-free "disassembler"
3:58 PM
things that don't:
  • those targets where i hardcode -O3 -flto
  • that place where i compile stb_image
(edited)
3:59 PM
i should switch to libpng or something
3:59 PM
or move at least move stbi away from face code (edited)
4:01 PM
okay nuking not png shortens build by half a second
4:03 PM
hmm i could use libcairo for png
4:04 PM
building without svg support saves a second
4:05 PM
i spend a shitload of time in anything that pulls in component, hmm
4:11 PM
my config system is so bad
4:12 PM
god
Avatar
$ obj/wwce-emu -image roms/CY213.rom8 E: this rom type is not supported my new emu build system is so great
7:06 PM
E: wwce was built without librsvg and libcairo W: display offsets were set even though no display data is present. I: calc display 192x64 STOP 80 STOP EXIT STOP 1480 STOP EXIT STOP 1 STOP EXIT zsh: floating point exception (core dumped) obj/wwce-emu -image roms/CY213.rom8 -conf src/inter/board.portable.cfg
7:06 PM
loll
7:07 PM
Downloading separate debug info for /usr/lib/libLLVM-16.so why debuginfod is very useful (not) (edited)
7:08 PM
okay
7:11 PM
c++ 0x0000555555576828 in Registrator<component::Core>::factory (this=0x5555555b0e60 <s_core_reg>, preferred=0x0) at src/lib/entry.cc:43 43 return m_reg[0].m_fac(); quality code
Avatar
alr (edited)
7:20 PM
SIGFPE from Thread 1 "wwce-emu" received signal SIGFPE, Arithmetic exception. 0x0000555555584eb2 in instr_div (core=0x7fffffffdeb8, flags=0 '\000', op0=0x7fffffffde70, op1=0x7fffffffde58) at third_party/u8_emu/src/core/instr_impl.c:653 653 uint64_t res = val0 / val1;
Avatar
#0 0x0000555555584eb2 in instr_div (core=0x7fffffffdeb8, flags=0 '\000', op0=0x7fffffffde70, op1=0x7fffffffde58) at third_party/u8_emu/src/core/instr_impl.c:653 #1 0x0000555555569eb5 in u8_step (core=0x7fffffffdeb8) at third_party/u8_emu/src/core/core.c:42 #2 0x0000555555580ec7 in (anonymous namespace)::U8Emu::step() (this=0x7ffff7fa3010) at src/inter/core.u8emu.cc:55 #3 0x000055555555a808 in entrypoint() () at src/emu.cc:28 #4 0x000055555555a710 in main(int, char**) (argc=5, argv=0x7fffffffe098) at src/emu.cc:13 (edited)
Avatar
c++ vs. c debate
Avatar
Avatar
Steveyboi
c++ vs. c debate
C++ is better okay debate closed
7:21 PM
anyway doesnt really matter
Avatar
is the problem because of the missing extern C thing
7:22 PM
thats easily fixed
Avatar
thought it was that's why i brought the c vs c++ thing up :/
Avatar
i had that fixed in my clone but i went to upstream
7:23 PM
1:cb6a
7:23 PM
CY213
7:23 PM
this is a build with broken SVG but doesnt matter
7:23 PM
cy000 also sigfpes
7:23 PM
no optimisations
7:23 PM
wtf
7:26 PM
wtf tho
7:26 PM
like how the hell does that happen
Avatar
okay now i get segfaults
7:35 PM
for fucks sake
7:35 PM
i love build nondeterminism (edited)
7:38 PM
ah, bug
7:40 PM
missing constinit
7:41 PM
now i get it reliably
Avatar
nice
Avatar
as in SIGFPEs reliably :^) (edited)
Avatar
bruh
7:41 PM
also implement status bar
7:42 PM
png
Avatar
in rom8?
Avatar
rom8 or some raw config or sth
Avatar
ah maybe
7:44 PM
later™️ tho (edited)
7:46 PM
what the fuck tho
7:48 PM
FFS
Avatar
also i wonder what did you do that caused the sigfpe thing
Avatar
nothing
7:50 PM
oh well i do know
7:50 PM
i moved to x86 from arm :^)
7:50 PM
i do literally all my testing on arm
7:50 PM
hmm i think i scale my faces to be way too big
7:51 PM
it works nicely on my hidpi m1
7:51 PM
less so on a normal tiny display
Avatar
thinking about window resizing
Avatar
i dont rly support resizing
7:53 PM
c++ ==388057==ERROR: AddressSanitizer: FPE on unknown address 0x55f41327cac2 (pc 0x55f41327cac2 bp 0x7ffd8cee2560 sp 0x7ffd8cee2520 T0) #0 0x55f41327cac2 (/home/pitust/code/wwce/obj/wwce-emu+0x33bac2) (BuildId: 165a92c527c79e3240e093729c4e7f308192fa85) #1 0x55f41327a3c4 (/home/pitust/code/wwce/obj/wwce-emu+0x3393c4) (BuildId: 165a92c527c79e3240e093729c4e7f308192fa85) #2 0x55f4131311e5 (/home/pitust/code/wwce/obj/wwce-emu+0x1f01e5) (BuildId: 165a92c527c79e3240e093729c4e7f308192fa85) #3 0x55f41311a736 (/home/pitust/code/wwce/obj/wwce-emu+0x1d9736) (BuildId: 165a92c527c79e3240e093729c4e7f308192fa85) #4 0x55f4131198a7 (/home/pitust/code/wwce/obj/wwce-emu+0x1d88a7) (BuildId: 165a92c527c79e3240e093729c4e7f308192fa85) #5 0x7f710460dccf (/usr/lib/libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658) #6 0x7f710460dd89 (/usr/lib/libc.so.6+0x27d89) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658) #7 0x55f412fe0574 (/home/pitust/code/wwce/obj/wwce-emu+0x9f574) (BuildId: 165a92c527c79e3240e093729c4e7f308192fa85)
7:53 PM
nothing useful from asan
Avatar
Avatar
Steveyboi
also i wonder what did you do that caused the sigfpe thing
i mean i rebased on new u8_emu
7:54 PM
upstream regression?
7:54 PM
wait no
7:54 PM
broken on old u8emu as well
Avatar
Avatar
Steveyboi
stpacp = self.sim.sfr[8] if self.stop_accept[0]: if stpacp & 0xa0 == 0xa0 and not self.stop_accept[1]: self.stop_accept[1] = True elif stpacp & 0x50 != 0x50: self.stop_accept[0] = False elif stpacp & 0x50 == 0x50: self.stop_accept[0] = True
ok so remember this?
8:21 AM
yeah that was actually wrong
8:21 AM
so, here's fixed code if anyone wants to have a look stpacp = self.sim.sfr[8] if self.stop_accept[0]: if not self.stop_accept[1]: if stpacp & 0xa0 == 0xa0: self.stop_accept[1] = True elif stpacp & 0x50 != 0x50: self.stop_accept[0] = False elif stpacp & 0x50 == 0x50: self.stop_accept[0] = True
Avatar
i just ignore stpacp
3:06 PM
no real point
Avatar
i should make a u8 tester, but by modifying an emu rom
3:25 PM
i plan the code to be in segment 2
3:25 PM
first half (0 - 7fffh) are strings
3:25 PM
the rest is code
Avatar
meowcrocontroller 11/13/2023 4:59 PM
Do we have a C compiler for u8?
4:59 PM
Which can compile programs to run on emulators?
Avatar
Avatar
meowcrocontroller
Do we have a C compiler for u8?
yes
5:00 PM
but we don't have an assembler
5:00 PM
lapis's one outputs intel hex
5:00 PM
i tested it a while ago and it outputted garbage
Avatar
GammaVelorum 11/13/2023 5:28 PM
whats an assembler
5:28 PM
assembly to u8 bytes? (edited)
Avatar
Avatar
Steveyboi
but we don't have an assembler
*working assembler
5:32 PM
and not assembler, but toolchain
5:33 PM
ccu8 doesnt have a nice driver and you have to do compile -> assemble -> link -> objcopy
5:35 PM
so its cc1u8 -> rasu8 -> rlu8 -> ohu8 (edited)
5:35 PM
the problem is that ohu8 doesnt want to work
Avatar
Avatar
Steveyboi
i tested it a while ago and it outputted garbage
idk sounds like you cant test
5:46 PM
i managed to make it work
5:46 PM
i used the expert strategy of reading the manual
5:47 PM
:020100001200EB :00000001FF this is the hex file
5:47 PM
02 is code 00 is data
5:47 PM
i think
5:47 PM
ah no
5:47 PM
okay
5:47 PM
:02 means code
5:47 PM
then load pc (0100)
5:48 PM
then 00 whatever nobody cares
5:48 PM
and asm bytes
5:48 PM
then checksum
Avatar
nice
6:37 PM
cool
6:38 PM
(btw i got message delay)
6:38 PM
i will retest when i get home
Avatar
i used some random flags
6:45 PM
and it worked idfk
Avatar
this is the script i used
361 bytes
9:00 PM
i also used a hex2bin tool
9:00 PM
for decoding intel hex
9:01 PM
test assembly file
119 bytes
Avatar
so i was making my own u8 tester, and unintentionally found another bug in delta's core
11:53 AM
so, these are strings for the title screen of the tester, located at 2:0010H
11:54 AM
and i made a copy of strcpy that copies null-terminated data from segment 2 to data segment 0 (00:8000H)
11:54 AM
wait....
11:54 AM
FCK
11:54 AM
i forgot
11:54 AM
segment 2 isn't mapped
11:55 AM
aaaaa my stupid brain
Avatar
here's my u8 tester currently
12:19 PM
it only has title screen which is broken for some reason
12:19 PM
i haven't found why it happens (edited)
12:19 PM
and i'm out of time now
12:19 PM
to use make sure to disable mod 2 in your emulator and map data segment 2 to code segment 2
12:20 PM
then jump to 2:0000H
Avatar
ok so i used the callback thing in delta's core to add unknown SFR R/W logs
9:46 AM
that's fx-880BTG/EY-023B emu rom (edited)
9:51 AM
hmmmm
Avatar
and i can confirm that SetPeriBCD is indeed somehow related to the F4xxH SFRs
10:07 AM
by changing SetPeriBCD(1) to SetPeriBCD(0) in simwrapper.js i got 1+1=0
10:09 AM
same symptoms
10:09 AM
10:10 AM
and forensic test also crashes
Avatar
OMG
10:25 AM
i found the SetPeriBCD byte
10:25 AM
on offline emu
10:26 AM
now i can just set a read breakpoint and...boom, jackpot (edited)
Avatar
ok so i found the function that does the BCD stuff
11:09 AM
its at offset 0x3020 in SimU8engine.dll
11:10 AM
(2.10.1.0)
Avatar
meowcrocontroller 11/15/2023 12:14 PM
Cwii has bcd coprocessor for all of the math stuff?
Avatar
maybe
Avatar
or the BCD support is built into the MCU (ML610904)
12:56 PM
and there is some pin or sth that enables it
Avatar
cool my emu now builds in 8 seconds (edited)
Avatar
@Steveyboi Hey, i want to learn about address on emulator, can you Guide me the basics about it
4:56 PM
Like address to hex code
Avatar
Avatar
pitust
cool my emu now builds in 8 seconds (edited)
cool
Avatar
Avatar
xGreen
Like address to hex code
read users ROP tutorial
5:37 PM
lmao the qr code literally says EY-001 V.A Bt OK SUM8585 NG 000000000000
5:38 PM
i wonder if the bcd peripheral has dma
5:38 PM
i made my code set the entire sfr region to 0x41 whenever i enter stop mode and its still 0
5:41 PM
the qr code is probably useful in the factory tbh
5:49 PM
0x0f400 encodes numbers in this mildly funny way
Avatar
The Administrator 11/15/2023 5:56 PM
could the bcd peripheral be some sort of FPU?
Avatar
Hmm, interesting
Avatar
Avatar
The Administrator
could the bcd peripheral be some sort of FPU?
yea i mean
6:39 PM
that much is obvious
6:40 PM
f400 encodes things in a mildly cursed way i REd at some point already
6:43 PM
each 0x8c is a 0x8 at 0x900f
6:43 PM
88 is 4
6:44 PM
84 is 2
6:44 PM
80 is 1
6:48 PM
hmm
6:48 PM
this is interesting
6:48 PM
very
Avatar
what apps we should download to learn about ROP @Steveyboi
7:42 PM
idk how to view the code of emulator
Avatar
GammaVelorum 11/15/2023 8:11 PM
cheat engine
8:11 PM
i dont know the specifics though
Avatar
BCD looks ultra pain
8:21 PM
but alr i think i have a guess for how it works
Avatar
what you got
8:22 PM
what have you discovered
8:22 PM
?
Avatar
okay so
8:22 PM
f480 is like bcd ram
8:23 PM
f400 is for command or something? idk its always the same (edited)
8:23 PM
wait no its not
Avatar
on the web emu its set to FF
8:24 PM
most of the time
Avatar
just means reading it gives 0xff tho (edited)
8:24 PM
BCDRST 0x0f402 BCDOP 0x0f400 BCDRAM 0x0f480 this is what i think the regs are
8:25 PM
and its like a coprocessor i guess?
8:25 PM
so you write a number to bcdram
8:25 PM
do some operations
8:25 PM
read it back
Avatar
and compare with the old value or sth?
Avatar
Avatar
Steveyboi
and compare with the old value or sth?
uh no i dont think so
Avatar
so after it reads the value from bcdram back what does it do with it
Avatar
Avatar
Steveyboi
so after it reads the value from bcdram back what does it do with it
well i think the math is done at that point
9:53 PM
so you do another op
9:53 PM
i think
Avatar
so have you found a way to emulate it correctly yet?
Avatar
I don't get why you would do that though?
Avatar
Avatar
Delta
I don't get why you would do that though?
yeah idk the whole bcd peripheral thing makes no sense
Avatar
also there should probably be an "operation complete" flag
Avatar
Avatar
Delta
also there should probably be an "operation complete" flag
maybe
Avatar
i am currently commenting f_1B6CE in fx-82CW (EY-001A) emu rom rn
Avatar
Avatar
Steveyboi
i am currently commenting f_1B6CE in fx-82CW (EY-001A) emu rom rn
thanks
Avatar
figuring out absolutely anything about BCD is gonna suck so hard
Avatar
kinda want to write my own core ngl (edited)
Avatar
my emulator now includes a live disassembler thingy (edited)
4:38 AM
please ignore the bug
4:38 AM
better screenshot
4:39 AM
time to add a register view
4:40 AM
an arrow pointing to the current instruction
4:46 AM
quality
4:47 AM
perfect
4:49 AM
colors!
4:53 AM
hmm should i split these into different windows
4:59 AM
because i have three things i want to show
4:59 AM
disassembly, registers, debug console
Avatar
Avatar
pitust
colors!
What software is it
Avatar
Avatar
xGreen
What software is it
my emulator
6:06 AM
ui is done with sdl2 + cairo + pango
6:06 AM
i hate pango
6:07 AM
and rsvg
6:07 AM
and glib in general
Avatar
Avatar
pitust
my emulator
Can i download any software like this one
Avatar
Avatar
xGreen
Can i download any software like this one
wdym
Avatar
Is there a similar program online?
Avatar
as in, a custom emulator?
6:08 AM
there is steveybois emu
6:09 AM
the source code for my emu is public here: https://git.malwarez.xyz/~pitust/wwce
6:09 AM
tho git clone doesnt work over http
Avatar
Ok, I'm trying to download it to see how ROP works
Avatar
ah it wont help you
abyss 1
6:09 AM
not much
6:10 AM
well hmm you could use it to set up rops and stuff
Avatar
Oh shyt, do you know any program help me learn ROP
Avatar
hmm i should make a tool kinda like ropgadget
Avatar
Avatar
xGreen
Oh shyt, do you know any program help me learn ROP
hmm i dont think so
6:10 AM
that could be a cool project tbh
Avatar
Cheat engine, is it
Avatar
Avatar
pitust
uh
Btw. How to convert addres like 1:A36H to Hex code
Avatar
Avatar
xGreen
Btw. How to convert addres like 1:A36H to Hex code
uh
6:12 AM
0x0001 0x0a36
6:12 AM
or the other way around idr
6:13 AM
or maybe not
6:13 AM
idk
Avatar
Avatar
pitust
idk
Okay, thanks for your help, i think i know what is it
Avatar
ah yes
6:14 AM
so pop pc pops two pops
6:14 AM
first pc
6:14 AM
then csr
6:15 AM
here, 1 is CSR and 0xa36 is PC
6:15 AM
so 0x0a36 0x0001 is the rop (edited)
Avatar
so has anyone got accurate BCD emulation yet?
Avatar
Oh man I watched that one to learn ROP
Avatar
i have no idea how i managed to learn ROP
11:13 AM
just read users ROP tutorial
Avatar
Avatar
Steveyboi
so has anyone got accurate BCD emulation yet?
So what exactly is BCD in this context?
Avatar
Binary-Coded Decimal
Avatar
and in this case there's some weird peripheral that seems to be doing some of the calculations
Avatar
Ok, this is what I was assuming before. So why Steveyboi is asking if anyone did accurate BCD emulation if probably there is no even inaccurate one? 😁
1:53 PM
Actually now I'm wondering what will happen if in original emulator I modify call to this SetPheriBCD(0) instead of 1?
1:53 PM
Will it won't work at all or it will have some hidden bugs
Avatar
Have any program like this one yet
1:54 PM
if yes, what is it
Avatar
Avatar
a.mnemonic
Actually now I'm wondering what will happen if in original emulator I modify call to this SetPheriBCD(0) instead of 1?
it acts just like the current community emus
2:35 PM
all calculations return 0
2:35 PM
forensic test softlocks
Avatar
Interesting
Avatar
Avatar
pitust
lmao the qr code literally says EY-001 V.A Bt OK SUM8585 NG 000000000000
yeah it contains the serial number
3:35 PM
thats why it needs to be blurred
3:35 PM
because serial number -> calculator ID
3:35 PM
and you can use calculator ID to get free classpad license
Avatar
That's why I think that BCD in this case not necessarily mean binary coded decimal 🙂 maybe more something like "Builit-in Coprocessor Device"
Avatar
Avatar
Steveyboi
and you can use calculator ID to get free classpad license
ahh
Avatar
Avatar
a.mnemonic
That's why I think that BCD in this case not necessarily mean binary coded decimal 🙂 maybe more something like "Builit-in Coprocessor Device"
maybe
5:18 PM
but i think it might mean binary coded decimal in this case
5:19 PM
since the function in fx-82CW emu i disassembled uses DAA (edited)
5:19 PM
and does some writes to the BCD memory
Avatar
Avatar
a.mnemonic
That's why I think that BCD in this case not necessarily mean binary coded decimal 🙂 maybe more something like "Builit-in Coprocessor Device"
dunno
6:12 PM
also the video shows an updated cheat table
Avatar
@Steveyboi have any emulator use rom similar real rom
Avatar
fx-82ES non plus sample emulator
Avatar
Avatar
Steveyboi
fx-82ES non plus sample emulator
btw, when we find the right address on emulator rom, how we find that address on real rom
Avatar
try to call some random functions with ROP
Avatar
quality png loader
5:36 PM
quality loader pt 2
5:36 PM
perfect
Avatar
now add status bar graphic
5:42 PM
okay
5:43 PM
does the interface bar change between different models?
Avatar
yes
Avatar
incredible
Avatar
ES and ES+ all use the same bar
Avatar
what are the different interface bars
Avatar
first, ES and ES+
Avatar
i really need to amend rom8 to handle es and solar82
5:44 PM
cool
Avatar
then we have FC-x00V
5:44 PM
and fx-SOLAR II
Avatar
okay thanks a lot
Avatar
this is CWI
5:45 PM
this is CWII
Avatar
thanks!
5:45 PM
now time to implement all this stuff
5:45 PM
also png fuuun
5:45 PM
oh fun i need to implement more build system crap
5:45 PM
to handle building variants for libraries
5:46 PM
@Steveyboi what about bounding boxes (ie which pixel corresponds to which part of the status bar)
5:46 PM
and also even more code in my face compositor
Avatar
the bits for ES, ES+ and FC are already on the wiki (edited)
5:47 PM
for FC, Math is removed
Avatar
ah yes but i also want coordinates
5:47 PM
and stuff
Avatar
ok
5:47 PM
this is ES/ES+ status_bar_crops = ( (0, 0, 8, 10), # [S] (9, 0, 9, 10), # [A] (21, 0, 8, 9), # M (32, 0, 17, 10), # STO (50, 0, 17, 10), # RCL (70, 0, 21, 10), # STAT (91, 0, 32, 10), # CMPLX (123, 0, 19, 9), # MAT (142, 0, 17, 10), # VCT (161, 0, 9, 10), # [D] (170, 0, 9, 10), # [R] (180, 0, 9, 10), # [G] (192, 0, 14, 9), # FIX (206, 0, 14, 10), # SCI (224, 0, 23, 10), # Math (249, 0, 9, 9), # v (258, 0, 9, 9), # ^ (268, 0, 19, 11), # Disp )
5:48 PM
tuple format is of pygame.Rect
Avatar
ah yes this is basically what i want for all the things
Avatar
FC-x00V status_bar_crops = ( (0, 0, 9, 10), # [S] (13, 0, 9, 10), # [A] (26, 0, 9, 9), # M (38, 0, 19, 10), # STO (60, 0, 19, 10), # RCL (81, 0, 24, 10), # STAT (108, 0, 19, 10), # 360 (129, 0, 10, 10), # SI (142, 0, 23, 9), # DMY (168, 0, 10, 10), # [D] (178, 0, 10, 10), # [R] (188, 0, 10, 10), # [G] (202, 0, 16, 9), # FIX (218, 0, 16, 10), # SCI (0, 0, 0, 0), # (blank) (246, 0, 8, 9), # v (254, 0, 9, 9), # ^ (266, 0, 22, 11), # Disp )
5:50 PM
CWI status_bar_crops = ( (1, 1, 19, 20), (25, 1, 19, 20), (53, 2, 17, 18), (83, 2, 25, 19), (121, 2, 40, 18), (172, 1, 19, 20), (193, 1, 19, 20), (214, 1, 19, 20), (244, 2, 36, 18), (284, 2, 34, 18), (330, 2, 17, 18), (358, 1, 10, 19), (375, 2, 18, 17), (398, 2, 20, 18), (428, 3, 16, 15), (449, 3, 17, 15), (470, 3, 17, 15), (492, 3, 16, 15), (518, 1, 23, 19), (551, 0, 23, 23), )
Avatar
for CWII i only have crops for a height 12 version
5:50 PM
but you can make it yourself
Avatar
ah thats fine
5:50 PM
cwii is broken anyway :^)
Avatar
the crop tuples are just (tl_x, tl_y, width, height)
5:51 PM
very simple
Avatar
ah yes makes sense
Avatar
i hate wayland
Avatar
zsh: segmentation fault (core dumped) obj/wwce-conftest -conf [ var a nil ] high quality emulator
Avatar
good job
Avatar
i cannot believe it
7:21 PM
casioemux
7:21 PM
literally
7:21 PM
FORCES
7:21 PM
python 3.10
7:23 PM
(my arch wsl uses python 3.11)
7:24 PM
bruh what a joke
7:25 PM
this is bad design
7:26 PM
wish the emulator could disassemble on the fly
Avatar
Avatar
Steveyboi
wish the emulator could disassemble on the fly
really u try to download it bruh
Avatar
Avatar
Steveyboi
wish the emulator could disassemble on the fly
my emu can
Avatar
Avatar
Steveyboi
i cannot believe it
me when no pkgconfig
Avatar
help
Avatar
yeah man idk kconfig-frontends is beyond me
8:04 PM
its very nice when it works
8:05 PM
but having it work on every platform is borderline impossible
Avatar
Avatar
Steveyboi
help
try building the espressif fork: https://github.com/espressif/kconfig-frontends
8:05 PM
says its ported to windows
8:06 PM
mine is based on it, but idk man
8:06 PM
i really need a better config system
8:06 PM
not just for this either
Avatar
on laptop now, i happened to fork that on the laptop
Avatar
i belive the linux tree has a python-based version of this bloody thing as well?
8:10 PM
idk just patch it away and manipulate .config manually
Avatar
yeah i dont know
Avatar
oh thank goodness ubuntu wsl has it
Avatar
alright so how do i clone wwce properly
8:34 PM
ok i cloned it properly i think
8:34 PM
command i used git clone --recursive https://u8.malwarez.xyz/git/wwce -b trunk
8:35 PM
yOOOoooOoooOooO shEeEeEeEeEeEet
8:36 PM
alright uhhhh
8:36 PM
how to build?
8:37 PM
oh actually just run ./x again
8:38 PM
uhhh help
Avatar
@pitust ?
Avatar
Avatar
Steveyboi
uhhh help
grr
9:15 PM
get better vim
Avatar
its related to vim?
9:16 PM
you need a not two year old vim
Avatar
Avatar
Steveyboi
uhhh help
xxd -n isnt supported in your xxd i guess
9:16 PM
xxd is part of vim btw
Avatar
Avatar
pitust
you need a not two year old vim
my vim is not two years old tho VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 18 2023 04:12:26)
Avatar
Avatar
Steveyboi
my vim is not two years old tho VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 18 2023 04:12:26)
okay, sorry, 4 years old
9:17 PM
two year old xxd
Avatar
i have two year old xxd xxd 2021-10-22 by Juergen Weigert et al.
9:17 PM
lol
Avatar
i have xxd 2023-10-25
9:18 PM
so from, uh, last month
Avatar
apt upgrade time
Avatar
you can try removing the dependency on obj/config.o
9:19 PM
line 378, s = ['obj/config.o'] => s = []
9:19 PM
then you need to tell wwce where to find it at runtime (edited)
9:20 PM
and also if you get objcopy errors, pull again
Avatar
oh my god
9:32 PM
my arch wsl's xxd is 2023-10-25
9:33 PM
and it also has kconfig-frontends :/ (edited)
9:33 PM
just wasted shetton of time
Avatar
Avatar
Steveyboi
and it also has kconfig-frontends :/ (edited)
or does it?
9:34 PM
9:34 PM
9:40 PM
ok i'm building on arch rn
9:40 PM
omg it...works??
9:40 PM
it built with no errors
9:41 PM
wtf, kconfig-frontends still not detected
9:42 PM
probably some program detection problem
9:43 PM
hmm i should try make install
9:44 PM
ayyyy
9:44 PM
there we go
9:44 PM
no ninja, not a big deal
9:44 PM
oh
9:44 PM
my (edited)
9:44 PM
god
9:44 PM
it... built
9:44 PM
no errors
9:45 PM
bruh
9:46 PM
9:46 PM
i used strace
9:50 PM
@pitust?
9:50 PM
help pls
Avatar
Avatar
Steveyboi
bruh
for fucks sake
Avatar
Avatar
Steveyboi
bruh
okay uh
11:38 PM
can you attach gdb
11:38 PM
or at least, send the binary and coredump
11:38 PM
null deref
11:38 PM
huh
Avatar
Avatar
Steveyboi
bruh
oh
11:39 PM
i think i know what could be the issue
Avatar
Avatar
Steveyboi
bruh
broken rom8 btw (edited)
11:40 PM
thats reported though i think (edited)
Avatar
Avatar
Steveyboi
bruh
what do you get if you do echo $WAYLAND_DISPLAY $DISPLAY
Avatar
Avatar
pitust
broken rom8 btw (edited)
my frontend loads it just fine...
Avatar
Avatar
Steveyboi
my frontend loads it just fine...
yeah but its out of date
11:44 PM
i dont have code for backwards compat
11:44 PM
but it does get checked so its not that
11:45 PM
i bet its sdl failing
Avatar
here i use a different rom8
11:59 PM
comes straight from your website
Avatar
Avatar
pitust
what do you get if you do echo $WAYLAND_DISPLAY $DISPLAY
wayland-0 :0
Avatar
Avatar
Steveyboi
comes straight from your website
mhm
12:01 AM
okay
12:01 AM
yeah i figured that wasnt it
Avatar
Avatar
Steveyboi
wayland-0 :0
but fuck that breaks that hypothesis
12:01 AM
alr
12:01 AM
what is your .config
12:01 AM
specifically
Avatar
508 bytes
Avatar
alr yea
12:01 AM
you need sdl2 (edited)
12:02 AM
and pango and cairo
12:02 AM
also i recommend getting mold to make linking faster
Avatar
installed those, still segfaults
Avatar
remove .config
12:03 AM
and rebuild (edited)
12:03 AM
i should add sanity checks
12:03 AM
for this (edited)
Avatar
new error
12:05 AM
floating point exception
12:05 AM
yes
12:06 AM
@Delta can you apply the fucking patch i sent (edited)
Avatar
Avatar
Steveyboi
floating point exception
u8emu bug
Avatar
Avatar
pitust
@Delta can you apply the fucking patch i sent (edited)
uhhh did you update the submodules?
Avatar
Avatar
Steveyboi
uhhh did you update the submodules?
dont mention submodules
12:07 AM
:^)
Avatar
why is it working fine for me then
12:08 AM
🤔
Avatar
Avatar
Steveyboi
why is it working fine for me then
ah yes i have them
12:08 AM
dk why
12:08 AM
i know its a bug
12:08 AM
and that its fixed by not having broken code
Avatar
Avatar
Steveyboi
why is it working fine for me then
could literally be python setting some random flag
Avatar
its the division by 0 thingy right
12:08 AM
it is
12:09 AM
still not fixed upstream
12:09 AM
i hate submodules (edited)
Avatar
is this fixed or not fixed void instr_div(struct u8_core *core, uint8_t flags, struct u8_oper *op0, struct u8_oper *op1) { uint64_t val0 = oper_read(core, op0); uint64_t val1 = oper_read(core, op1); core->regs.psw &= 0b00111111; uint64_t res = val0 / val1; if (val1 == 0) core->regs.psw |= 0b10000000; if (res == 0) core->regs.psw |= 0b01000000; oper_write(core, op0, res); oper_write(core, op1, val0 % val1); }
12:09 AM
hmmm
Avatar
not fixed
Avatar
i think not fixed
Avatar
its the broken version
Avatar
time to ping him a million times so he gets his ass up and fixes the bug
Avatar
he just has to apply the patch i sent
12:10 AM
lmao
12:10 AM
i FIXED THE BUG
Avatar
can't you like fork the repo
12:11 AM
and use that instead
12:11 AM
i probably will
12:11 AM
ill do that now actually
Avatar
might probably switch to your fork in the future
12:14 AM
grr
12:14 AM
i hate submodules (edited)
12:14 AM
its so easy to fuck them up
Avatar
now time to figure out how to switch submodules
12:14 AM
same :^)
12:15 AM
im thinking of the nuclear option of git filter-repo
Avatar
I've created a git repository with a submodule in it. I'm able to tell the submodule itself to change its remote repository path, but I'm not sure how to tell the parent repository how to change the
Avatar
fatal: remote error: upload-pack: not our ref cc8c7595960d3be0f73439e6010eac4c9dc7a934 fatal: remote error: upload-pack: not our ref cc8c7595960d3be0f73439e6010eac4c9dc7a934 for fucks sake
12:16 AM
no errors when i did git submodule sync --recursive
Avatar
yeah thats because i have a commit in my submodule that doesnt exist upstream
12:16 AM
fuck it
12:17 AM
im filter-repoing it
12:17 AM
blah blah dont rewrite history i dont care
12:17 AM
booyah
Avatar
i followed the instructions
Avatar
i have the bloody commit
12:18 AM
but git submodule update keeps failing
Avatar
git submodule sync --recursive?
12:18 AM
try that?
12:18 AM
maybe
12:19 AM
im writing my own commit
12:19 AM
okay i forced u8_emu to a70
Avatar
finished updating
12:20 AM
turns out wasn't too hard ^_^
Avatar
new head 25a50f2665b30af5e2e8395b8cf302421ae2d9b7
12:21 AM
lol
12:21 AM
i figured it out too
12:21 AM
just a little bit of manual commits
Avatar
uhhh wtf is this
Avatar
Avatar
Steveyboi
uhhh wtf is this
grr
12:44 AM
rm -rf the repo and clone again (edited)
Avatar
i did do that, re-cloned it
12:44 AM
removed the -b trunk also
12:44 AM
git clone --recursive https://u8.malwarez.xyz/git/wwce
Avatar
okay now do it again :^)
12:45 AM
i really need to get git.malwarez.xyz http cloning working
Avatar
problem: ssh key shit
12:48 AM
its super easy
Avatar
ok imma make one
12:50 AM
for the email do i just use example@example.com?
Avatar
yeah, or whatever else
12:51 AM
doesnt matter
Avatar
ok i added an SSH key
12:53 AM
oh and btw i verified your email
Avatar
thanks
12:53 AM
i thought the system was broken
12:54 AM
turns out it just needed manual verification
12:54 AM
it usually is automatic
12:54 AM
for it to be automatic you need to have email configured correctly
12:54 AM
which i dont
12:54 AM
theres a handy "verify email" button in the admin panel tho
Avatar
ok i recompiled wwce
12:55 AM
and it segfaults once again for no reason
12:55 AM
i installed clang, maybe that's the problem
12:55 AM
i test with both
Avatar
also i see some "resource temporarily unavailable" messages in the strace log
Avatar
probably normal
Avatar
here's the strace log
126.03 KB
Avatar
oh wow so much better
12:59 AM
not very useful though
12:59 AM
could be literally fucking anything
1:00 AM
this is a 5500 loc codebase this is unlikely to work
1:00 AM
please coredump+binary
1:00 AM
core dumps go to /var/lib/systemd/coredump iirc (edited)
1:01 AM
or at least run it under gdb
1:03 AM
thats gdb
1:05 AM
backtrace (edited)
1:05 AM
(bt)
Avatar
here you go
Avatar
ah yes
1:07 AM
pull again
1:07 AM
small bug, fixed it
1:07 AM
or build without console > linux terminal (edited)
1:08 AM
most likely you are missing a cli option or something
1:08 AM
and its unhappy
1:08 AM
or actually
1:08 AM
this is probably an error
Avatar
yay works now
Avatar
cool!
1:09 AM
like fully?
Avatar
yea i think so
Avatar
just a lil weird that theres no status bar graphic
Avatar
ah yes
1:10 AM
contributions welcome :^)
Avatar
oops
1:10 AM
not again
1:10 AM
i have freaking dual monitor
1:10 AM
typing things into the wrong window happens a lot to me too
1:11 AM
(i use lots and lots of splitscreens)
Avatar
Avatar
pitust
contributions welcome :^)
the main difficulty here is getting the python ./x script to cooperate
Avatar
also there should be a keybind table
1:12 AM
if not idk what keys to press
Avatar
Avatar
Steveyboi
also there should be a keybind table
wdym, like it shows you the keybinds?
Avatar
yea
Avatar
would be cool ig
1:12 AM
actually sounds quite easy
1:12 AM
ah well
1:12 AM
blocked on the same thing status bar is blocked on
1:13 AM
ie non-inter config options
Avatar
ok so the emulator did a fcky wucky and froze
1:13 AM
wtff
1:13 AM
gdb time
1:13 AM
yeah idk sorry
1:13 AM
it "shouldnt"
1:13 AM
ah well
1:13 AM
it wont be happy if you like basic overflow
Avatar
ahhh
Avatar
if you run with -dbg trace youll be able to see what its doing
Avatar
i think i know why
Avatar
and that isnt driven by the stop timer (edited)
Avatar
i usually press shift and alpha with F1 and F2
Avatar
and i just repaint whenever sdl tells me to
Avatar
Avatar
Steveyboi
i usually press shift and alpha with F1 and F2
unlikely to work correctly
1:14 AM
my keybinds are the same as on caduo btw
Avatar
ya it hangs when i press F1 or F2
Avatar
huh okay
Avatar
probably same for the other F__ keys
1:16 AM
strangely it only hangs in mode menu
Avatar
ultra weird
Avatar
btw i'm using fx-83GT+ rom8
Avatar
wtf works fine
Avatar
yes
1:17 AM
wait
1:17 AM
what
1:17 AM
hmm
Avatar
classwiz works fine
Avatar
probably just sth with the fx-83GT+ rom8
1:18 AM
it uses pitust,2 compatible iirc
Avatar
oh god
1:18 AM
what the fuck
1:18 AM
i think i found at least part of the issue
1:19 AM
time to yama ptrace_scope = 0
1:19 AM
huh
Avatar
these keybinds are so hard to use when i'm used to the official emulators' keybinds
Avatar
weiiird
1:19 AM
i froze it
Avatar
Avatar
Steveyboi
these keybinds are so hard to use when i'm used to the official emulators' keybinds
my keybinds are the official ones iirc
Avatar
backspace not working
Avatar
F1 and F2 aren't shift and alpha
Avatar
thats just my code being fucked probs
1:20 AM
hm
1:20 AM
gotta do that too
Avatar
F3, F4 are not mode and on
Avatar
supposedly im sitting a lot in linenoiseEditFeed
1:21 AM
wtf
Avatar
also you haven't implemented 2BPP for CWII yet?
1:22 AM
its a fairly big rework of a bunch of crap
Avatar
oh also
1:23 AM
arrow keys not working
Avatar
invisible roots 👀
Avatar
todo:
  • move png and svg to lib
  • implement romconfig
  • 2bpp for cwii
  • fn keys
  • backspace
  • fx82solar and check es nonplus
  • debugger features: watchpoint, breakpoint, print registers, scripting (?), step, continue, last write (?), breakpoint, memory viewer, disasm, etc
  • status line
  • keybind showing gui
(edited)
1:26 AM
also my timer goes backwards lol what
1:26 AM
okay cool
Avatar
Avatar
Steveyboi
invisible roots 👀
how on earth does that happen lmao
Avatar
because CWII only highlights parts with the cursor in it
1:28 AM
here's how it should look
Avatar
oh ohh
1:28 AM
for fucks sake
1:29 AM
ill do 2bpp soon(tm) (edited)
1:29 AM
more annoying crap to deal with :^)
Avatar
The Administrator 11/22/2023 1:08 PM
i know its not a casio calculator but it is still a nx-u8/100
Avatar
Avatar
The Administrator
i know its not a casio calculator but it is still a nx-u8/100
and thus the todo grows
2:44 PM
do you even mind installing Python in the first place
2:44 PM
also ncurses and readline package are outdated
2:45 PM
and VSx64
Avatar
Avatar
xGreen
helpp
wtf
3:20 PM
don't use msvc
3:21 PM
you should use arch wsl to build
3:21 PM
(install from microsoft store)
Avatar
would be kinda cool to support windows in my emu tbh
3:30 PM
but also man windows is so cursed
Avatar
yea
Avatar
emscripten is bad enough as is
Avatar
but ofc you can technically run it on windows with arch wsl
Avatar
ah, the biggest source of linuxisms is src/lib/os.posix.cc (edited)
3:31 PM
and all of src/inter/con.tty.cc
Avatar
Avatar
pitust
and all of src/inter/con.tty.cc
since thats linenoise
3:35 PM
and i dont think that works on windows
Avatar
okay i made a fancy debugger thing
8:05 PM
approximately 0 docs
8:05 PM
so ymmv
Avatar
but it has lots of features
8:06 PM
breakpoints/watchpoints/adding and subtracting numbers in expressions/shitty and broken backtraces/memory diffing/stop and continue etc
8:06 PM
and obviously printing registers and memory and stuff
8:08 PM
+ integrated disasm obviously
Avatar
have you committed
Avatar
Avatar
The Administrator
i know its not a casio calculator but it is still a nx-u8/100
whats the rom? (edited)
Avatar
he shared in #new-ti-mathprint
Avatar
it is nx-u16 tho so won't work in u8 emulator
Avatar
whats the difference?
8:14 PM
also fuck (edited)
Avatar
help
8:23 PM
also what is this?
8:25 PM
ok i recloned with arch and it works fine now
8:28 PM
also can you add option to use custom syntax
8:28 PM
i kind of don't like this weird syntax
8:31 PM
also how tf do i enter diagnostic on CY000 emu rom8
Avatar
Avatar
Steveyboi
help
casual windows crap
Avatar
Avatar
Steveyboi
also how tf do i enter diagnostic on CY000 emu rom8
uh idk
Avatar
Avatar
Steveyboi
also can you add option to use custom syntax
uh, i could
9:27 PM
kinda
Avatar
Avatar
Steveyboi
also can you add option to use custom syntax
you (probably) want -dbg daid
Avatar
Avatar
Steveyboi
Click to see attachment 🖼️
rerun config
10:39 PM
./x nconf
10:39 PM
Debugger > A real debugger
10:40 PM
and also make sure you have enabled console > linux terminal
Avatar
i don't see a real debugger
Avatar
do i need to install gdb or sth?
10:41 PM
clone from git@git.malwarez.xyz:~pitust/wwce (edited)
Avatar
btw here's a warning thrown, if you want you can fix it
Avatar
i know
10:43 PM
but im too lazy
Avatar
i need help
Avatar
i recommend you read src/lib/dacf.py
10:45 PM
i need to build proper docs and do tab completion still
Avatar
can you add proper hex editor in the future?
Avatar
Avatar
Steveyboi
can you add proper hex editor in the future?
yeah okay
Avatar
Avatar
Steveyboi
it is nx-u16 tho so won't work in u8 emulator
The Administrator 11/24/2023 7:44 AM
i did not have to change any cpu code to get it to boot nx-u8/100 and nx-u16/100 instruction set are identical
Avatar
actually, what is the difference between u8 and u16?
8:10 AM
from what i see in the two manuals they appear to be exactly the same
Avatar
they are afaik
Avatar
The Administrator 11/25/2023 10:47 AM
beucalc v0.5 will support running in web browser (screenshot taken on my old 2000s pc)
👍 1
Avatar
will it support interface and status bar imgs, pixel color and size,...?
Avatar
Avatar
Steveyboi
will it support interface and status bar imgs, pixel color and size,...?
The Administrator 11/25/2023 10:52 AM
i plan to add some of those features
Avatar
@Steveyboi do you have 580vnx emu rom.bin
Avatar
its in user's repo
11:51 AM
Contribute to user202729/fxesplus development by creating an account on GitHub.
Avatar
Avatar
Steveyboi
its in user's repo
and how to use ur new tool
Avatar
you import it in a python script
Avatar
What is it used for
11:53 AM
maybe it can help me to learn ROP
11:53 AM
its for disassembling
11:55 AM
wam
11:55 AM
how to translate this one
11:55 AM
Avatar
ignore it
Avatar
i've saw you translate it to english
11:56 AM
llike: dialog...
Avatar
Avatar
xGreen
Click to see attachment 🖼️
that is just graphics data and strings interpreted as U8 code
11:57 AM
scroll down and you will eventually see actual code (the code that isn't "unused")
11:58 AM
note that some functions are called from a jump table so they may be mislabeled as "unused" (edited)
Avatar
Avatar
The Administrator
beucalc v0.5 will support running in web browser (screenshot taken on my old 2000s pc)
does it support running in a non 2000s web browser?
4:54 PM
also my emu got there first :^)
Avatar
yea would be rly cool if you can run beucalc on ie4 or sth
Avatar
meowcrocontroller 11/28/2023 8:26 PM
Delta's c core could be compiled to WASM
Avatar
yea ig but no way we makin some webapp
Avatar
Avatar
meowcrocontroller
Delta's c core could be compiled to WASM
i did
11:43 PM
it ran well
11:43 PM
poorly
11:43 PM
the core was fine
11:43 PM
my emulator was about as broken as it could be
2:25 AM
does any emulator use LARGE memory model?
2:25 AM
ok, actually anything bigger than 1 segment needs LARGE
2:26 AM
so answering my own question probably ALL emulators use LARGE memory model 🙂
Avatar
Avatar
a.mnemonic
so answering my own question probably ALL emulators use LARGE memory model 🙂
emulators dont care* about the memory model
2:41 AM
i think
2:41 AM
hmm or maybe not
Avatar
SimU8.dll has export named SetMemoryModel so probably they care in some way, however i think that if you set large memory model and run code which is prepared for SMALL it will work anyway
2:44 AM
because why not 😛
Avatar
Avatar
a.mnemonic
so answering my own question probably ALL emulators use LARGE memory model 🙂
nah
6:48 AM
fx-82SOLAR II emulator uses small memory model iirc
Avatar
Avatar
a.mnemonic
SimU8.dll has export named SetMemoryModel so probably they care in some way, however i think that if you set large memory model and run code which is prepared for SMALL it will work anyway
may not work correctly if there are some precise SP manipulations for small memory model for popping LR and PC
Avatar
vngithubdev 11/30/2023 9:14 PM
anyone know who hosting caduo ?
Avatar
happysheep
Avatar
vngithubdev 11/30/2023 9:17 PM
brr i click on ram editor but it redirected me to rom editor 💀
Avatar
he expanded it to cover all data memory
9:17 PM
scroll down to address 0x9000 and you will find RAM (edited)
Avatar
happy sheep 11/30/2023 9:18 PM
use goto 9000 if using cwii
Avatar
vngithubdev 11/30/2023 9:18 PM
im at cwi
Avatar
goto d000
Avatar
vngithubdev 11/30/2023 9:19 PM
oh i see it
Avatar
happy sheep 11/30/2023 9:20 PM
or maybe i can fix it later :/ just set a default start offset
Avatar
vngithubdev 11/30/2023 9:29 PM
can u add the real rom for some calc
Avatar
not yet (edited)
9:29 PM
he used code from classpad
9:30 PM
he'd need to modify the WASM but currently its heavily obfuscated so won't be easy
Avatar
vngithubdev 11/30/2023 9:30 PM
oh
Avatar
happy sheep 11/30/2023 9:37 PM
the wasm can possibly run a real rom, but i haven't implement the real ki/ko thing
9:38 PM
and now the data memory should default set the ram start to the start offset of editor (edited)
Avatar
also can you somehow make e.caduo.eu.org/<stuff after> redirect to e.20142022.xyz/<stuff after>
9:39 PM
instead of redirecting to select page
Avatar
happy sheep 11/30/2023 9:40 PM
for what🤔
9:40 PM
i'm just lazy
Avatar
i usually go to https://e.caduo.eu.org/rebuild?model=EY023 to go straight to emulator
Avatar
happy sheep 11/30/2023 9:41 PM
you enter it manually?
Avatar
no its chrome suggestions thing
Avatar
happy sheep 11/30/2023 9:42 PM
ah ok
9:44 PM
btw 2014 and 2022 is the released year of cwi and cwii, as you probably guessed
Avatar
can you add the code memory and data memory strings to the i18n resource string list?
9:45 PM
so i can translate it
Avatar
happy sheep 11/30/2023 9:52 PM
as a technical term, i think it's better to not translate it
Avatar
also i updated the mobile devices can only download file string
👌 1
Avatar
The Administrator 12/5/2023 8:12 PM
wip fx-es plus emulator written in c running on a 80386 with 4 mb ram
💖 1
Avatar
Will it run with 640K RAM?
Avatar
maybe
Avatar
Avatar
ArNeKJ
Will it run with 640K RAM?
The Administrator 12/6/2023 6:53 AM
no beacause it requires win32 which requires at least a few megabytes of ram it is compiled for a 32-bit 80386. it will never run on a 16-bit computer also the actual ram of the 80386 computer seems to be around 3712k (640k + 3072k)
Avatar
my WIP U8 emulator core: https://github.com/gamingwithevets/pyu8 (very bugged)
An nX-U8 core emulator in Python. Contribute to gamingwithevets/pyu8 development by creating an account on GitHub.
Avatar
i am currently installing windows nt 3.1 in a VM since windows nt 3.1 is actually 32-bit it may be able to run winx-u8
Avatar
well shid
9:13 AM
gotta move to #off-topic-general
Avatar
Avatar
The Administrator
no beacause it requires win32 which requires at least a few megabytes of ram it is compiled for a 32-bit 80386. it will never run on a 16-bit computer also the actual ram of the 80386 computer seems to be around 3712k (640k + 3072k)
IDK, but for ES+ emulation it could use as low as ROM size + 3.5KiB
7:11 PM
Oh um, also plus SFR area
7:11 PM
so 6KiB
Avatar
i made it so right-clicking in my frontend pauses it thanks to owner's hex clock romhack i found a flaw where when right-clicking on the emu window while single step is off the core thread is still running when i click away from the context menu the clock jumps ahead
Avatar
i made some config options optional, so now you can have a pretty much bare bones window
10:04 PM
also just noticed ES font no actually its ES PLUS font but the bottom part of the 9 comes from the 8 (edited)
Avatar
i decided to challenge myself to get the ES font on ES PLUS again took a while but eventually i got it
Avatar
hmm yes this is the correct output
5:16 PM
most quality emulator
Avatar
seems legit
5:36 PM
perfect
Avatar
and now CY* and EY* svg faces work too (edited)
Avatar
input works again
Avatar
nice
6:01 PM
have you added support for shift, ctrl, ...?
Avatar
Avatar
Steveyboi
have you added support for shift, ctrl, ...?
no(t yet)
6:03 PM
but im refactoring rom8 loading to support non-rom8 inputs
Avatar
and keybinds too now (edited)
Avatar
var imgLoad in var calcType 0x06 var displayOptions in var x 86 var y 108 var w 192 var h 63 var scale 3 end var model "CY000 (emu)" var rom in var path "roms/blob/rom.bin" end var faceSVG in var path "roms/blob/face.svg" end end
8:47 PM
i now support converting rom8 into these thingies
8:47 PM
broken :^)
8:49 PM
E: cannot open file (null): Bad address quality parsing
Avatar
and now i even have support for key hitboxes
Avatar
im trying to knock down the os requirements for my emu, so now all i need is U abort U __ctype_b_loc U __ctype_tolower_loc U __cxa_atexit U __errno_location U exit U fopen U fread U free U fseek U ftell U __libc_start_main U malloc U memcmp U memcpy U memset U printf U __progname_full U program_invocation_name U realloc U __stack_chk_fail U __stack_chk_guard U strchr U strcmp U strdup U strerror U strlen U strncmp U usleep U operator delete[](void*) U operator delete(void*) U operator new[](unsigned long) U operator new(unsigned long)
12:11 AM
less abort, libc start main (crt), usleep and f* functions (if i wrote an os wrapper) _stack_chk{guard,fail} (compiler helpers) (edited)
12:12 AM
plus half a meg of ram for all the code of course :^) (edited)
Avatar
i mean the least portable part of my entire emulator is the config and build system
1:57 AM
which is horrifyingly bad
2:01 AM
time to completly reimplement it all ig (edited)
2:06 AM
(but with less bad crap)
Avatar
(by writing more c++ code)
Avatar
My C emulator needs file I/O and tons of RAM & it runs super slow :(
Avatar
happy sheep 12/9/2023 12:34 PM
what is the STOP TYPE ADDRESS in here for a real calc rom?
12:36 PM
for emulator rom, cwii uses 0x88e00, cwi uses 0x48e00, esplus and earlier uses 0x8e00
Avatar
that doesn't exist on real rom
12:38 PM
on real rom KI is F040H (inverted) (edited)
12:39 PM
KO is F046H for GYX and later, and F044H (inverted) for GY- and earlier
Avatar
happy sheep 12/9/2023 12:43 PM
oh ok, is there a similar logic on a real rom?
Avatar
afaik no, stop type address does not exist in any real rom
Avatar
happy sheep 12/9/2023 12:56 PM
so should i skip or rewrite this logic if i want to implement a real rom
Avatar
i think skip
Avatar
i give this address a different and possibly more descriptive name
3:11 PM
"pvbase" (pv = paravirtualization)
Avatar
i'd prefer stop control
Avatar
its not stop control tho
3:20 PM
also theres like a bunch of pv registers
Avatar
also fyi stop type is not even a register its literally just a byte stored in normal RAM
3:29 PM
ah well so iirc 0x8e00 is past the end of ram (edited)
11:56 PM
bug
11:56 PM
i dont deal with hidpi properly
11:56 PM
or hianything
11:56 PM
but it works on macos with some patches
Avatar
now my emulator supports rendering SVGs at minimum possible scale (edited)
Avatar
==23461==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x60300001bc10
1:39 AM
mmmm (edited)
1:40 AM
#1 0xffff3cb95f8c (/usr/lib/libLLVM-16.so+0xfd5f8c) (BuildId: 643dbef070e1ff6af10c347a75d9daaa4f8b5180)
1:40 AM
cool!
1:40 AM
1:40 AM
perfect
Avatar
this is why i hate linux /j gwe@zero:~/Documents/wwce$ ./x [1/3] cxx src/lib/char-tables.cc [2/3] cxx src/gentool/pc.cc FAILED: obj/prepare/src/gentool/pc.cc.o clang++ -c -o obj/prepare/src/gentool/pc.cc.o src/gentool/pc.cc -MD -MF obj/prepare/src/gentool/pc.cc.o.d -Iinc -ggdb -fno-exceptions -fno-rtti -Iinc -std=c++2a -DUSE_PREPARE_SIMPLIFIED -I/usr/include/pkgconf src/gentool/pc.cc:13:11: error: no matching function for call to 'pkgconf_client_new' auto c = pkgconf_client_new(handlePCErr, nullptr, pkgconf_cross_personality_default()); ^~~~~~~~~~~~~~~~~~ /usr/include/pkgconf/libpkgconf/libpkgconf.h:209:32: note: candidate function not viable: no known conversion from 'bool (const char *, const pkgconf_client_t *, void *)' (aka 'bool (const char *, const pkgconf_client_ *, void *)') to 'pkgconf_error_handler_func_t' (aka 'bool (*)(const char *, const pkgconf_client_ *, const void *)') for 1st argument PKGCONF_API pkgconf_client_t * pkgconf_client_new(pkgconf_error_handler_func_t error_handler, void *error_handler_data, const pkgconf_cross_personality_t *personality); ^ src/gentool/pc.cc:24:11: error: no matching function for call to 'pkgconf_client_new' auto c = pkgconf_client_new(handlePCErr, nullptr, pkgconf_cross_personality_default()); ^~~~~~~~~~~~~~~~~~ /usr/include/pkgconf/libpkgconf/libpkgconf.h:209:32: note: candidate function not viable: no known conversion from 'bool (const char *, const pkgconf_client_t *, void *)' (aka 'bool (const char *, const pkgconf_client_ *, void *)') to 'pkgconf_error_handler_func_t' (aka 'bool (*)(const char *, const pkgconf_client_ *, const void *)') for 1st argument PKGCONF_API pkgconf_client_t * pkgconf_client_new(pkgconf_error_handler_func_t error_handler, void *error_handler_data, const pkgconf_cross_personality_t *personality); ^ 2 errors generated. ninja: build stopped: subcommand failed.
Avatar
what the actual fuck
7:04 PM
this is an impressive level of failure
7:04 PM
i tested on macos and on linux
7:04 PM
lmao
Avatar
that is linux mint btw
Avatar
oh yeah i just pushed even more changes
7:05 PM
probably old pkgconf tbh
7:05 PM
ah
7:05 PM
the arg is const void*
7:05 PM
got it (edited)
7:05 PM
at least that one is an easy fix
7:09 PM
replace void* with const void* in handlePCErr
Avatar
GammaVelorum 12/10/2023 7:42 PM
HE HATES LINUX 🚨 🚨 🚨 HE HATES LINUX
7:42 PM
isnt that a c issue though
Avatar
Avatar
GammaVelorum
isnt that a c issue though
its more like
7:44 PM
out of date pkgconf
7:44 PM
i think
7:44 PM
not quite sure
Avatar
GammaVelorum 12/10/2023 7:45 PM
so i was using an online c++ compiler to try out c++ back then and i missed a semicolon and the error message filled half the screen since then i used rust
Avatar
🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 rust🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨
🦀 1
🚨 1
7:48 PM
also my image has a size of -78459116763945422674464264440873542184862373604054900466406207486020235885428094583711860174744727186975625436608659973558075431916264863731380525185785665480277330976051438328503024633701844880793556956884686427226190490654945310616673613083011280440738064693587241925027983634995382136151518216192x0 (edited)
Avatar
Avatar
pitust
replace void* with const void* in handlePCErr
new error now gwe@zero:~/Documents/wwce$ ./x [1/10] cxx src/lib/string.cc [2/10] cxx src/lib/opt.cc [3/10] cxx src/lib/os.posix.cc [4/10] cxx src/lib/char-tables.cc [5/10] cxx src/gentool/pc.cc FAILED: obj/prepare/src/gentool/pc.cc.o clang++ -c -o obj/prepare/src/gentool/pc.cc.o src/gentool/pc.cc -MD -MF obj/prepare/src/gentool/pc.cc.o.d -Iinc -ggdb -fno-exceptions -fno-rtti -Iinc -std=c++2a -DUSE_PREPARE_SIMPLIFIED -I/usr/include/pkgconf src/gentool/pc.cc:37:7: error: use of undeclared identifier 'pkgconf_queue_solve' if (!pkgconf_queue_solve(c, &pkgq, &world, 10000)) { ^ src/gentool/pc.cc:39:3: error: use of undeclared identifier 'pkgconf_solution_free' pkgconf_solution_free(c, &world); ^ src/gentool/pc.cc:56:2: error: use of undeclared identifier 'pkgconf_solution_free' pkgconf_solution_free(c, &world); ^ 3 errors generated. [6/10] cxx src/gentool/config.cc [7/10] cxx src/gentool/conf-kconfig.cc [8/10] cxx src/lib/entry.cc [9/10] cxx src/gentool/main.cc ninja: build stopped: subcommand failed.
Avatar
for fucks sake
9:29 PM
package compiler and linker metadata toolkit
Avatar
well shid
Avatar
im pretty sure its a super old version of pkgconf
9:30 PM
or something
9:31 PM
gotta add ci
9:31 PM
i guess
Avatar
mine is 1.6.3
Avatar
mine is 2.1.0
9:32 PM
sigh
9:32 PM
hmm
9:32 PM
is it that pkgconf
9:32 PM
fucking incredible
9:32 PM
9:33 PM
incredible
9:33 PM
okay these two are mirrors
9:33 PM
and given that the commits are credited to "Ariadne Conill" i figure the gitea is authoritative
9:36 PM
WHAT THE FUCK
9:36 PM
ah
9:36 PM
its a two year old mirror
9:36 PM
i see (edited)
9:37 PM
yeah okay i dont know
9:37 PM
but maintaining compat with a 4 year old pkgconf sounds impossible
9:38 PM
so
9:38 PM
im gonna go back to implementing windows-target cross compile
9:39 PM
ah yeah windows fails because no os.posix
Avatar
aaaa apt contains super old packages
9:40 PM
i run autoreconf -fi in pkgconf repo and it says autoreconf >= 2.71 is required
9:40 PM
i dont even
Avatar
i have version 2.69 from 2012
Avatar
of course!
9:41 PM
i have 2.71 (2021)
9:41 PM
ubuntu! (edited)
Avatar
crap screw linux mint imma go back to windows and wsl now
Avatar
ok i compiled the new version on arch wsl
9:52 PM
i need an example config file tho
Avatar
config file for what?
10:05 PM
you dont need one
10:05 PM
you can do wwce-emu path/to/rom8
10:05 PM
or to generate a config there is a "toconf" tool
10:05 PM
wwce-toconf path/to/rom8
Avatar
ah ok
Avatar
oh hmm
10:06 PM
--help on toconf gives me a uaf
Avatar
directory to store blobs is blanked out?
10:09 PM
bake is for stuff you want to stash into the binary yes
10:09 PM
you can put a rom8 there
10:09 PM
or a config file
10:09 PM
though not all things arent packed yet (edited)
Avatar
so does the toconf have image extract yet?
Avatar
so raw binaries wont work
Avatar
Avatar
Steveyboi
so does the toconf have image extract yet?
wdym
10:10 PM
toconf will extract images and stuff from the rom8 yes (edited)
10:11 PM
$ obj/wwce-toconf roms/CY000-emu.rom8 -blob roms/blobs var imgLoad in var calcType 0x06 var displayOptions in var x 80 var y 89 var w 192 var h 63 var scale 3 end var model "CY000 (emu)" var rom in var path "roms/blobs/rom.bin" end var faceSVG in var path "roms/blobs/face.svg" end // whatever (edited)
Avatar
ohhhhhhhh
10:12 PM
-blob
10:12 PM
--help has a bug
10:12 PM
i fixed it now
Avatar
also can you make toconf automatically create directories (edited)
10:15 PM
maybe
Avatar
Avatar
Steveyboi
also can you make toconf automatically create directories (edited)
idk i think a windows port is more important
Avatar
arch wsl is good enough...?
Avatar
yeah but
10:30 PM
nahhh
Avatar
hmm ok
10:30 PM
i think you should aim for mingw support as well
Avatar
for now im gonna aim for whatever zig cc does
Avatar
also i spent some time making this masterpiece
10:32 PM
you changed the model config entry
10:32 PM
all right first challenge
10:33 PM
how the fuck do i handle build orchestration
10:33 PM
lets start by incrementing the build fence ig
10:37 PM
okay i get to linking
10:37 PM
cool
10:41 PM
hmm
10:41 PM
time for wine ig
10:41 PM
with the incredible cycle of write changes -> send to remote server -> see if it works -> repeaet
10:42 PM
works? ehhh
10:42 PM
missing os::sleep missing os::createThread missing os::pollfd missing os::mstime missing os::readFile missing os::writeFile missing os::freeData missing os::exit missing os::fail missing os::intr missing os::dir missing os::probe
10:43 PM
most of these arent needed for most things
10:44 PM
cool
10:45 PM
only missing os::sleep from linking (edited)
10:45 PM
missing os::sleep missing os::createThread missing os::pollfd missing os::mstime missing os::probe actually all of these
Avatar
cool all my tools now build
10:53 PM
well
10:53 PM
the emu wont be useful unless i add sdl or win32
10:54 PM
missing mstime and probe
10:54 PM
but they arent used in a minimal build
10:54 PM
hmm
10:54 PM
gotta disable ANSI on windows sometimes? (edited)
10:55 PM
fuck
10:56 PM
the code is broken
10:56 PM
but also
10:56 PM
oh wait holy shit
10:56 PM
this isnt my bug i think
10:58 PM
this is the faulting instruction
10:58 PM
LMAO
10:59 PM
@Delta your core is broken, part n+1
10:59 PM
wine says this is 1 0x0040ebd1 oper_imm+0x181(core=<internal error>, oper=<internal error>, val=<internal error>) [Z:\home\pitust\code\wwce\third_party\u8_emu\src\core\instr.c:271] in wwce-emu (0x0151fd10) (edited)
11:00 PM
this is an -Og build hmm
11:00 PM
time to build -O0
11:01 PM
=>0 0x0040ebd1 oper_imm+0x181(core=<internal error>, oper=<internal error>, val=<internal error>) [Z:\home\pitust\code\wwce\third_party\u8_emu\src\core\instr.c:271] in wwce-emu (0x0151fd10) mm, yeah its this (edited)
11:01 PM
yeah its line 271 (edited)
11:01 PM
confirmed by llvm-addr2line
Avatar
Avatar
pitust
@Delta your core is broken, part n+1
fix in your fork time
Avatar
pretty much
11:02 PM
first time to figure out what the issue even is
Avatar
the error appears to be in instr.c line 271
11:04 PM
val |= (-1) << oper->flags;
11:04 PM
this is the code
11:04 PM
you know
11:04 PM
i dont think this is legal is it
11:04 PM
third_party/u8_emu/src/core/instr.c:271:15: runtime error: left shift of negative value -1 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior third_party/u8_emu/src/core/instr.c:271:15 in third_party/u8_emu/src/core/instr_impl.c:222:16: runtime error: shift exponent 18446744073709551615 is too large for 64-bit type 'uint64_t' (aka 'unsigned long') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior third_party/u8_emu/src/core/instr_impl.c:222:16 in
11:05 PM
ubsan isnt stoked about this
11:05 PM
psw |= ((val >> (shift - 1)) & 1) << 7; this is illegal (instr_shift) (edited)
11:07 PM
this is srl
11:07 PM
okay
11:07 PM
ah
11:07 PM
zero-wide shift breaks psw setting (edited)
11:07 PM
lets see what the manual says
11:08 PM
A shift size of 0 produces the equivalent of a NOP instruction.
(edited)
11:09 PM
okay
11:09 PM
it works
11:09 PM
braille rendering is mega slow tho
11:10 PM
cool
11:10 PM
its still fast on real windows
11:10 PM
and the ansi thing is just wine being cringe
11:10 PM
but braille still no workey (edited)
11:11 PM
hmm theres no way i can develop win32 ui support via scp (edited)
11:11 PM
here is the binary btw
11:13 PM
it should work fully fine if you have utf8 enabled
11:13 PM
yep
11:14 PM
works in cygwin
11:14 PM
like fully
11:14 PM
well
11:14 PM
except ui
11:14 PM
that still needs implementing
Avatar
Avatar
pitust
here is the binary btw
uhhhhhhhh
11:31 PM
help?
11:32 PM
wait no i forgot to set utf8 (edited)
11:32 PM
hang on
11:32 PM
now its printing blank...
11:32 PM
wait no i got a screen
11:33 PM
slow af, no screen clearing or anything
11:36 PM
but hey, its WIP ¯\_(ツ)_/¯
Avatar
Avatar
Steveyboi
slow af, no screen clearing or anything
yes
11:38 PM
the braille face is like
11:38 PM
pretty much og testing code (edited)
11:38 PM
im trying to get binfmt-misc to work rn
11:38 PM
wtf why is linux so fucking complicated (edited)
Avatar
also sth is wrong with your wwce tools, they keep saying unknown argument -help when i pass --help arg to them...
11:42 PM
maybe only show help when you pass -h / --help
11:44 PM
also
Avatar
Avatar
Steveyboi
also sth is wrong with your wwce tools, they keep saying unknown argument -help when i pass --help arg to them...
shhh
11:48 PM
my option parser is extremely high quality
🤣 1
👍 1
Avatar
Avatar
Steveyboi
also
shush
11:48 PM
see above
11:49 PM
ok i obtained wine for testing
11:49 PM
this fucking sucked (edited)
11:51 PM
wine: could not load ntdll.so: (null)
11:51 PM
WHAT THE FU
11:51 PM
strace: test_ptrace_get_syscall_info: PTRACE_TRACEME: Function not implemented
11:51 PM
mm
11:51 PM
qemu quality
Avatar
Since I'm running an ARM system, I installed Arch in a x86_64 chroot, then installed WINE. However, running wincfg gave wine: could not load ntdll.so: (null). I assumed that it meant that WINE coul...
11:52 PM
thanks
11:53 PM
ah
11:53 PM
of course
11:53 PM
resizing things makes qemu segfault zsh
11:53 PM
or any other shell
11:53 PM
wonerful
Avatar
oh yeah btw i made a fix for the u8emu bugs
1:55 AM
and @Steveyboi update your submodule to incorporate the new silly bugs i found
Avatar
i hate win32
Avatar
hmm for some reason holding the window in resize makes it not repaint
4:29 AM
all right
4:29 AM
this somehow works
4:29 AM
well
4:29 AM
kinda
4:29 AM
the color space is all wrong
4:29 AM
i should switch from rgbx8888 to something people actually use
4:29 AM
so i dont have to mess around with color as much
4:29 AM
and also i think i need to do something to make windows like me more (edited)
4:31 AM
probably i have to repaint via the paint apis
4:32 AM
not via GetDC
4:32 AM
or it thinks im stuck
4:32 AM
oh i think its because i invalidate my whole rect
Avatar
Avatar
pitust
Click to see attachment 🖼️
still broken tho
4:35 AM
the biggest thing is lack of svg support
4:35 AM
and CY* is just broken i think idk why (edited)
4:36 AM
but esplus works fine
4:36 AM
except keyboard only (edited)
4:36 AM
and its all yellow
4:36 AM
and ugly
4:36 AM
but apart from that it works
4:37 AM
png works fine because i have stb_image
4:38 AM
but damn the todo keeps on growing
Avatar
Avatar
pitust
and @Steveyboi update your submodule to incorporate the new silly bugs i found
done
Avatar
Avatar
pitust
Click to see attachment 🖼️
yea this definitely is some high quality stuff
6:53 AM
btw i managed to get ANSI working in cmd (edited)
6:59 AM
reg file to enable ANSI in cmd Windows Registry Editor Version 5.00 [HKCU\Console] VirtualTerminalLevel=dword:00000001 (edited)
Avatar
Avatar
Steveyboi
reg file to enable ANSI in cmd Windows Registry Editor Version 5.00 [HKCU\Console] VirtualTerminalLevel=dword:00000001 (edited)
ah
Avatar
Avatar
Steveyboi
btw i managed to get ANSI working in cmd (edited)
also why config files instead of rom8 :^)
Avatar
text > binary
4:56 PM
rom8 is way more convinient
4:57 PM
its also way the fuck easier to deal with
4:57 PM
also i have a new custom binary data format in wwce!!! (edited)
4:57 PM
(asset blobs, they are used for packing all the files into the executable)
Avatar
Avatar
pitust
rom8 is way more convinient
maybe do this? :p $ ./wwce-emu config.cfg W: you are using a config file. we recommend you use rom8 instead, it's much better! ... (edited)
Avatar
Avatar
Steveyboi
maybe do this? :p $ ./wwce-emu config.cfg W: you are using a config file. we recommend you use rom8 instead, it's much better! ... (edited)
lol
4:59 PM
first i need to implement pkgconf <2.0
Avatar
still need special keys support ^_^
5:02 PM
i hate clicking with mouse
5:03 PM
fun fact: thats part of the reason why i didn't add right-click key holding in my frontend
Avatar
fine pkgconf <2.0.0 i supported
Avatar
Avatar
Steveyboi
still need special keys support ^_^
lots of key stuff is mega broken atm
Avatar
Avatar
Steveyboi
still need special keys support ^_^
its high on my todo list
5:11 PM
but maybe ill fix all the bugs first
Avatar
Avatar
pitust
its high on my todo list
irc user 👀
Avatar
btw can you try building on linux mint again
5:19 PM
it should work now
5:19 PM
the cwii 2bpp this is max pain
Avatar
Avatar
pitust
btw can you try building on linux mint again
ok i will try about 3 hours later
5:37 PM
okay
5:37 PM
where do i get the second bitplane?
5:39 PM
ah 0x089000
5:49 PM
that doesnt seem to be working very well
6:36 PM
no more invisible square roots
Avatar
Avatar
pitust
Click to see attachment 🖼️
hang on the colors are wrong
8:59 PM
F800H is the low bit, 8:9000H is the high bit
9:00 PM
you're doing the reverse
Avatar
Avatar
Steveyboi
F800H is the low bit, 8:9000H is the high bit
wait oh
9:55 PM
fun
Avatar
Avatar
Steveyboi
F800H is the low bit, 8:9000H is the high bit
ah cool fixed
Avatar
F800H is the low bit, 8:9000H is the high bit
Avatar
bro just copy pasted my messge
10:20 PM
AFTER i reported that its fixed (edited)
Avatar
i hate windows
10:42 PM
idk what the issue is
10:42 PM
but i hate it already
10:42 PM
because it means i still need to look for the proper colorspace magic
Avatar
will have to wait till tomorrow for linux mint testing
Avatar
ah its fine
10:44 PM
i figure i know what the fix for windows is (edited)
Avatar
holy shid lots of stuff changed
10:49 PM
uhhhh help
10:50 PM
pkgconf is 2.1.0
Avatar
for gods sake
10:53 PM
ill fix it soon
10:53 PM
downgrade to pkgconf <2.0.0 :^)
Avatar
bruh what a joke
Avatar
or pull again (edited)
10:54 PM
i added a fix behind and ifdef
Avatar
Avatar
Steveyboi
holy shid lots of stuff changed
yea
Avatar
btw i use chatgpt to convert keymap data from my frontend configs to wwce compatible
Avatar
i make it so each line (representing one key) is of the format <keysym> <x> <y> <w> <h>, then i just feed this into chatgpt These lines below are in the format `<keysym> <x> <y> <w> <h>`. You will convert each line to the format `var keys in var x <x> var y <y> var w <w> var h <h> var keysym <keysym> end`. `​`​` keymap data goes here... `​`​`
Avatar
the wwce config format is mildly cursed tbh
Avatar
and just like that i converted this 0x70 41 293 48 38 0x71 95 301 48 38 0x72 187 293 32 23 0x73 233 323 21 31 0x74 262 301 48 38 0x80 316 293 48 38 0x60 38 364 49 29 0x61 92 364 49 29 0x62 152 323 21 31 0x63 187 363 32 23 0x64 264 364 49 29 0x65 318 364 49 29 0x50 43 411 49 29 0x51 97 411 49 29 0x52 151 411 49 29 0x53 205 411 49 29 0x54 259 411 49 29 0x55 313 411 49 29 0x40 43 457 49 29 0x41 97 457 49 29 0x42 151 457 49 29 0x43 205 457 49 29 0x44 259 457 49 29 0x45 313 457 49 29 0x30 43 503 49 29 0x31 97 503 49 29 0x32 151 503 49 29 0x33 205 503 49 29 0x34 259 503 49 29 0x35 313 503 49 29 0x20 42 550 61 41 0x21 107 550 61 41 0x22 172 550 61 41 0x23 237 550 61 41 0x24 302 550 61 41 0x10 42 607 61 41 0x11 107 607 61 41 0x12 172 607 61 41 0x13 237 607 61 41 0x14 302 607 61 41 0x00 42 664 61 41 0x01 107 664 61 41 0x02 172 664 61 41 0x03 237 664 61 41 0x04 302 664 61 41 0x46 42 721 61 41 0x36 107 721 61 41 0x26 172 721 61 41 0x16 237 721 61 41 0x06 302 721 61 41
11:09 PM
to... all this, i can't paste directly into discord bc message limit
Avatar
most code editors support cursor stuff
11:13 PM
so you can have multiple cursors
11:13 PM
and operate on all of them at once
11:13 PM
or just use wwce-toconf on a rom8 file :^)
Avatar
linux mint error again
Avatar
also on windows arch wsl.... theres no image 🤮
11:06 AM
worst update eva
Avatar
Avatar
Steveyboi
linux mint error again
wtf
Avatar
Avatar
Steveyboi
also on windows arch wsl.... theres no image 🤮
wdym no image
3:19 PM
like no image loads?
3:19 PM
enable png and svg parsing in the build options :^)
Avatar
Avatar
Steveyboi
linux mint error again
okay ill fix that one ig
3:19 PM
well
3:19 PM
the sdl_getticks64 one is just old crap
3:23 PM
oh man
3:23 PM
the pixel format one double sucks
3:24 PM
the getticks64 thing can be fixed with some macros
3:29 PM
i think i wrote a fix for getticks
Avatar
alr i pushed the fix
5:52 PM
along with a fix to xrgb8888
Avatar
GammaVelorum 12/12/2023 6:03 PM
how do you even represent the memory in an emulator
6:03 PM
a huge array of bytes?
Avatar
yeah pretty much
6:09 PM
i just have each "core" have a 128k memory buffer (edited)
Avatar
thats not even THAT big though tbh
Avatar
new error (edited)
9:20 PM
also gimp capture bug (you can see white outline at the top and left of the image) (edited)
Avatar
Avatar
pitust
enable png and svg parsing in the build options :^)
i enabled libcairo, stb_image and rsvg and still no image (edited)
Avatar
Avatar
Steveyboi
new error (edited)
hey, the first one isnt my fault
9:43 PM
the pthread one...
9:43 PM
ill take a look
9:45 PM
okay
9:45 PM
i fixed those two
9:45 PM
hopefully for real this time
Avatar
Avatar
Steveyboi
i enabled libcairo, stb_image and rsvg and still no image (edited)
weird af
9:45 PM
is there any error?
9:45 PM
basically all error paths print what the error was
Avatar
Avatar
pitust
is there any error?
no error
Avatar
Avatar
pitust
hopefully for real this time
nope
Avatar
okay at this point
1:50 AM
get a normal system
1:50 AM
:^)
1:50 AM
whats your clang++ --version
1:50 AM
also try setting the compiler to gcc
Avatar
Avatar
Steveyboi
no error
wtf then idk
1:51 AM
then my bet is that there is no face set
1:51 AM
somehow
Avatar
Avatar
pitust
whats your clang++ --version
10.0.0
Avatar
Avatar
pitust
also try setting the compiler to gcc
it starts throwing cc1: warning: command line option ‘-fno-rtti’ is valid for C++/D/ObjC++ but not for C and fatal error: concepts: No such file or directory errors
8:33 AM
maybe add support for g++?
Avatar
Avatar
Steveyboi
10.0.0
well theres your problem
Avatar
Avatar
Steveyboi
maybe add support for g++?
i do support it
4:00 PM
just
4:00 PM
i need c++ version not from 2001 (edited)
Avatar
well then fuck linux mint
5:22 PM
imma go back to arch wsl
5:26 PM
this is literally like making a python script but you need 3.10 because it uses switch
Avatar
GammaVelorum 12/13/2023 6:36 PM
this is literally like python 2
Avatar
Avatar
Steveyboi
well then fuck linux mint
well concepts are c++20 tbf
7:47 PM
but still
7:47 PM
fucking annoying
Avatar
ig maintaining version compatibility with C(++) is 1000 times harder than python
Avatar
Avatar
Steveyboi
ig maintaining version compatibility with C(++) is 1000 times harder than python
nah
10:49 PM
its just like python
10:49 PM
if you run code intended for python 3.12
10:50 PM
using python 3.0
10:50 PM
its not gonna work very well
10:50 PM
a lot of the issues is just deps that changed over the last, uh, 5 years
Avatar
GammaVelorum 12/14/2023 9:49 AM
is cycle accuracy needed to get a working emulator?
Avatar
The Administrator 12/17/2023 1:00 PM
👍 1
Avatar
mmm, good
Avatar
GammaVelorum 12/17/2023 2:07 PM
are there any emulators that can emulate power off/on?
2:07 PM
like if i press shift ac the thing shuts down until i press on again
Avatar
happy sheep 12/17/2023 2:29 PM
iirc canon's emulator can power off
2:29 PM
and vinacal's
Avatar
for community made emulators, users one can power off
2:31 PM
also i think casio's emulators can technically power off, but the calls to shutdown function have been removed so you can never shutdown the emulator (edited)
Avatar
i handle power off
3:08 PM
by calling exit()
Avatar
bruhhhh
5:07 PM
instant cringe
Avatar
i should do all the proper lifecycle stuff
5:08 PM
and handle real roms too (edited)
5:08 PM
and stuff
5:14 PM
hmm okay how hard can ti stuff be :^)
Avatar
oh god theres so much hardware crap to deal with
6:00 PM
like low-power shutoff
Avatar
lol that's what happens when you dive into hardware details
Avatar
maybe we can use the SimU8 from the U8/16 sdk? (edited)
Avatar
cringe
7:44 PM
and doesnt work on arm or linux
Avatar
arm + linux more cringe than windows (edited)
Avatar
also where is the screen on ti?
Avatar
uhhhh have you read the users manual yet
Avatar
tho right now im in hw hell
7:45 PM
yes
7:45 PM
but its 750 pages im not reading it front to back
Avatar
look at appendix
Avatar
is it 0F100?
7:46 PM
yes
7:46 PM
okay
7:47 PM
okay
7:47 PM
whats the display size :^)
7:47 PM
ah 384x144
7:48 PM
doesnt look correct
Avatar
i'm starting to add support for it now
7:49 PM
and already ran into issue
7:50 PM
its repeatedly checking for bit 0 of F00EH
7:50 PM
ah thats WDP
7:53 PM
hmm they seem to actually use SWI
Avatar
Avatar
Steveyboi
ah thats WDP
its WDTCON
Avatar
WDTCON.0 = WDP
7:55 PM
ah yeah whatever
7:55 PM
i just set it to 0 in a loop
7:55 PM
i should probs implement proper wdt emulation
7:55 PM
but
7:56 PM
nah
7:58 PM
$$NUM_getIntAux$ti_nums seems to contain a SWI?
7:59 PM
or alternatively something is going horribly horribly wrong
Avatar
Avatar
pitust
$$NUM_getIntAux$ti_nums seems to contain a SWI?
uh
7:59 PM
no?
7:59 PM
NUM_getIntAux: 0:BA42H F8CE PUSH LR 0:BA44H F0015DB6 BL ENTER 0:BA48H E1F8 ADD SP, -08H 0:BA4AH F805 MOV ER8, ER0 0:BA4CH 8B30 MOV R11, R3 0:BA4EH 8020 MOV R0, R2 0:BA50H 1001 ADD R0, #01H 0:BA52H 8A00 MOV R10, R0 0:BA54H F085 MOV ER0, ER8 0:BA56H F2018C8E BL NUM_getDigit 0:BA5AH 0100 MOV R1, #00H 0:BA5CH F405 MOV ER4, ER0 0:BA5EH E600 MOV ER6, #00H 0:BA60H 0002 MOV R0, #02H 0:BA62H 8C00 MOV R12, R0 0:BA64H CE1C BAL .l_05C .l_024: 0:BA66H DAF9 ST R10, -7H[FP] 0:BA68H 1A01 ADD R10, #01H 0:BA6AH F46E PUSH XR4 0:BA6CH E00A MOV ER0, #0AH 0:BA6EH E200 MOV ER2, #00H 0:BA70H F06E PUSH XR0 0:BA72H F1012AD8 BL lmulu8lw 0:BA76H E104 ADD SP, +04H 0:BA78H F02E POP XR0 0:BA7AH B0FA ST ER0, -6H[FP] 0:BA7CH B2FC ST ER2, -4H[FP] 0:BA7EH D279 L R2, -7H[FP] 0:BA80H F085 MOV ER0, ER8 0:BA82H F2018C8E BL NUM_getDigit 0:BA86H 0100 MOV R1, #00H 0:BA88H E200 MOV ER2, #00H 0:BA8AH B47A L ER4, -6H[FP] 0:BA8CH B67C L ER6, -4H[FP] 0:BA8EH F046 ADD ER0, ER4 0:BA90H 8266 ADDC R2, R6 0:BA92H 8376 ADDC R3, R7 0:BA94H F405 MOV ER4, ER0 0:BA96H F625 MOV ER6, ER2 0:BA98H 80C0 MOV R0, R12 0:BA9AH 1001 ADD R0, #01H 0:BA9CH 8C00 MOV R12, R0 .l_05C: 0:BA9EH 80B7 CMP R0, R11 0:BAA0H C3E2 BLE .l_024 0:BAA2H F045 MOV ER0, ER4 0:BAA4H F265 MOV ER2, ER6 0:BAA6H F0005DBE B LEAVE
8:00 PM
i don't see any SWI here
8:00 PM
weird af
Avatar
wait what rom are you using
Avatar
ti30x prio (edited)
Avatar
huh
8:00 PM
maybe your disassembler is fucked?
Avatar
Avatar
Steveyboi
maybe your disassembler is fucked?
this is based on u8_emu messages :^)
Avatar
ooooh no don't tell me its wrong instruction detection
Avatar
its probably not
8:02 PM
oh
8:02 PM
its pc only
8:02 PM
not csr
8:05 PM
hmm so
8:05 PM
whats the format of the dolphin symbolmap
8:05 PM
as in
8:05 PM
what do all the $$$$$s mean
Avatar
ccu8 programming guide
Avatar
2.1 segment names generated by compiler
Avatar
oh its the segment name
8:06 PM
so the symbol name is everthing until the $ sign
8:06 PM
except the first $s, if present (edited)
Avatar
the labels also contain built in u8 functions
Avatar
oh frick 1:BA62H appears to contain an SWI #4
8:23 PM
i wrongly set the high nibble of the high byte to 8 so my disassembler didn't detect it :/
Avatar
heres the call updateIndicators: 1:BA5EH 00D4 MOV R0, #D4H 1:BA60H 01E5 MOV R1, #E5H 1:BA62H E504 SWI 4 1:BA64H F205 MOV ER2, ER0 1:BA66H 0001 MOV R0, #01H 1:BA68H 8233 OR R2, R3 1:BA6AH C801 BNE .l_010 1:BA6CH 0000 MOV R0, #00H .l_010: 1:BA6EH FE1F RT
8:28 PM
it is also called in some other parts of the rom
8:33 PM
i implemented symbol stuff
8:34 PM
so i now support loading and resolving symbols
8:34 PM
dolphinmap only for now
8:39 PM
now i also print pc and lr here (edited)
8:39 PM
symbolized too (edited)
8:46 PM
so the loop does this: 1. test r0==r4 or r0==0 and if so goes to 04244 or 0415e 2. test [0xc5f7].1 == 0 and if set goes to 0418c (taken?) 3. call 3fba: 4. clear interrupts 5. P3D = 0x3f 6. test P0D.5 ==1 -> 03fce 7. if P4D == 0 go to 04010 (taken) 8. P3D = P3DIR = 0 9. ei 10. repeat (edited)
8:46 PM
also
8:46 PM
i think the emu might be broken?
8:46 PM
seems to skip an instruction
8:47 PM
or well
8:47 PM
could just be my singlestep shit being buggy
8:48 PM
thats like a keyboard input loop
8:48 PM
huh
8:50 PM
i think my display stuff could be broken?
8:56 PM
still get this tho
Avatar
Avatar
pitust
still get this tho
The Administrator 12/18/2023 7:14 AM
the ti mathprint do not use 0F800 for lcd the emulator roms actually lack the code for their equivalent of render in stead the official emulator reads er0 (which contains the address of the buffer when swi01 is called) when swi 01 is executed (edited)
7:15 AM
ik its cursed but that is just how TI wrote their emulator and their emulator roms
Avatar
insanity
Avatar
The Administrator 12/18/2023 7:15 AM
here is how my mathprint emulator implements it (code from Processor.java) (edited)
Avatar
what about the other SWIs?
Avatar
Avatar
Steveyboi
what about the other SWIs?
The Administrator 12/18/2023 7:17 AM
02 is keyboard 04 is status indicators (works similar to 01)
Avatar
welp time to make my own fork of u8_emu
Avatar
Avatar
The Administrator
02 is keyboard 04 is status indicators (works similar to 01)
there is also SWI 0
8:10 AM
and 5
Avatar
The Administrator 12/18/2023 8:15 AM
only SWI 1, SWI 2, SWI 3, SWI 4 and SWI 5 are caught and used by the official emulator of those only SWI 1, SWI 2 and SWI 4 seem to be important
Avatar
hmm ok
Avatar
looks like delta's PUSH ELR thing is wrong
Avatar
Avatar
The Administrator
the ti mathprint do not use 0F800 for lcd the emulator roms actually lack the code for their equivalent of render in stead the official emulator reads er0 (which contains the address of the buffer when swi01 is called) when swi 01 is executed (edited)
ah
2:08 PM
cursed af
Avatar
SWI 3 is uart (edited)
2:16 PM
SWI1 is lcd
2:16 PM
SWI2 is key stuff
2:17 PM
SWI5 is key repeat
2:17 PM
SWI4 is icon stuff
Avatar
An nX-U8 core emulator. Contribute to gamingwithevets/u8_emu development by creating an account on GitHub.
3:34 PM
if delta doesn't fix bugs i will fix them
Avatar
GammaVelorum 12/18/2023 5:25 PM
how do u know he wont fix the bugs
Avatar
hes busy with uni work rn
Avatar
GammaVelorum 12/18/2023 5:54 PM
cool
5:54 PM
why not do a pull request though
5:54 PM
oh it is one
Avatar
Avatar
Steveyboi
now even with my fork
8:10 PM
swi is (v & 0xffc0) == 0xe500
8:12 PM
swi4
8:12 PM
anoher swi4
8:12 PM
this is swi1
8:12 PM
0xe708 ig (edited)
8:13 PM
okay now i get this garbage on the screen :^)
8:13 PM
swi2
8:13 PM
should grab the mapfile too
8:15 PM
oh yeah symbols make it super clear
8:15 PM
8:15 PM
i see i see
8:15 PM
GFX_flushToScreen :^)
8:15 PM
and thats also where all the render shit happens
8:16 PM
i think swi2 would put it to sleep until theres a key or something (edited)
8:16 PM
or alternatively my code is telling it theres a key about to be pressed
8:17 PM
width is definitely not 384 tho
8:18 PM
hmm
8:18 PM
i think my stride might be wrong actually
8:19 PM
this looks better
8:20 PM
hmm maybe this?
8:20 PM
er, this
8:20 PM
but this is garbage
8:20 PM
no way thats the correct composite
8:21 PM
dual bitplane maybe???
Avatar
wassup
Avatar
more fixes
8:22 PM
still trying to get the display to paint correctly
Avatar
Avatar
pitust
width is definitely not 384 tho
its 192x63
Avatar
swi1 is called from GFX_flushToScreen
8:22 PM
so this ig
8:23 PM
except thats garbage
Avatar
The Administrator 12/18/2023 8:24 PM
Avatar
i see
8:26 PM
x<<6|y
8:26 PM
wait
8:26 PM
thats row major???
8:26 PM
or whatever weird fb ordering is called
Avatar
hell naw one row is 1 column
8:27 PM
of data
8:29 PM
perfect
8:29 PM
thanks!
Avatar
owner saving the day for the nth time
Avatar
got sum data
9:45 PM
9:46 PM
if you're wondering: i decided to make the screen size 64*192
Avatar
there we go!
Avatar
Avatar
Steveyboi
Click to see attachment 🖼️
thats definitely the correct thing :^)
9:54 PM
cool
Avatar
also this keeps happening for some reason
Avatar
mildly cringe
Avatar
now how does keyboard work
Avatar
not sure
10:01 PM
something with swi2
10:02 PM
also
10:02 PM
fucking hell
10:02 PM
im trying to get a face
10:02 PM
the svg isnt composited fully (edited)
Avatar
here i used an online tool to convert the SVG to PNG
Avatar
wait what
10:02 PM
that face.svg is complete??? (edited)
10:03 PM
is it just gimp being stupid
Avatar
yea you can view in chrome
10:03 PM
yes
10:03 PM
damn it (edited)
10:03 PM
time to imagemagick
Avatar
not sure if any svg processors know how to process the CSS properly....
Avatar
probably imagemagick
10:04 PM
or rsvg possibly
10:05 PM
rsvg no likey
10:06 PM
ill try fixing it to make it not suck
10:06 PM
later
10:06 PM
width 640
10:07 PM
height something like 1390 (edited)
10:07 PM
rsvg_handle_get_intrinsic_size_in_pixels no workey ig
10:10 PM
1377
10:12 PM
no rsvg fails to paint
10:12 PM
same as gimp (edited)
10:13 PM
imagemagick fails to scale too (edited)
10:13 PM
ill try inkscape
10:18 PM
inkscape succeeds, kinda?
10:18 PM
yep
10:18 PM
inkscape is fine
10:18 PM
it completes a paint
Avatar
yay we have a winner
10:19 PM
hmm
10:19 PM
im not sure if the svg will work very well
10:19 PM
and the keys are off
10:19 PM
fuck
10:19 PM
but errors about transform-origin and transform-box
Avatar
Avatar
pitust
and the keys are off
they're not on chrome tho ¯\_(ツ)_/¯
10:20 PM
yes
10:20 PM
but the svg wont paint properly
10:20 PM
shit (edited)
10:20 PM
i dont want to bake them to png so i can use the S part of SVG (edited)
10:21 PM
doesnt really work if i have to rescale pngs or whatever
10:24 PM
inkscape misdraws because the keys are too tall
10:28 PM
<g id="TI30XPRIO_KEY_7_NONE" class="TI30XPRIO_KEY_7_NONE"> <rect x="60" y="375" class="ti_key_background_padding" width="48" height="44"></rect> <path class="ti_numpadKey" d="M102,415H66c-1.1,0-2-0.9-2-2v-26c0-4.4,3.6-8,8-8h30c1.1,0,2,0.9,2,2v32C104,414.1,103.1,415,102,415z"></path> <g> <polygon class="ti_numpadKey_art_primary" points="87.8,403.8 80,403.8 81,402 88.8,402 "></polygon> <path class="ti_numpadKey_art_primary" d="M88.7,396.1v1.7l-5.8,12h-2.7l5.8-11.5l0,0h-6.4v-2.1L88.7,396.1L88.7,396.1z"></path> </g> </g>
10:28 PM
the first path is the key
10:28 PM
the second part is the text
10:30 PM
i think ill restyle it
10:30 PM
to make it work
10:34 PM
would have to edit the paths manually i think
10:34 PM
this css sucks
10:34 PM
would probs be easier to rip the raw svg and implement my own key compositor
10:35 PM
svg css is just annoying tbh
Avatar
so process the CSS seperately?
Avatar
write my own css
10:35 PM
that sucks less hard
10:35 PM
and my own svg in general
10:35 PM
or at least adjust the svg boxes
Avatar
Avatar
pitust
write my own css
best (R)DIY supporter (edited)
10:37 PM
(re)do it yourself
Avatar
yep pretty much :^)
10:37 PM
hmm
10:37 PM
i could try scripting inkscape
10:41 PM
ok hmm no
10:42 PM
does inkscape not honor scale?
10:42 PM
ffs
Avatar
okay idfk
10:51 PM
ill try compositing the keys manually later
Avatar
how does the keyboard work?
9:33 PM
on ti mathprint
Avatar
this happens after the screen is drawn on every boot
Avatar
mildly cursed
Avatar
How to cross-compile C code for 80186 DOS machine? I want to test if my code runs on my 200LX
Avatar
The Administrator 1/7/2024 9:50 PM
Avatar
ok (edited)
Avatar
The Administrator 1/8/2024 12:44 PM
BeuCalc fx-5800P Test 2
Avatar
Yukidamayaki 1/8/2024 9:35 PM
Is the source code available somewhere? I would like modify it to be able to look at the memory trace (edited)
Avatar
mine has memory view feature
9:45 PM
and no beucalc is closed source but not encrypted so you can decompile it
🤫 1
Avatar
Avatar
Yukidamayaki
Is the source code available somewhere? I would like modify it to be able to look at the memory trace (edited)
The Administrator 1/9/2024 9:56 AM
it is not obfuscated so you can decompile it easily
Avatar
closed source smh
Avatar
also owner seems to want everyone to use his stuff
Avatar
#self-promotion
Avatar
Avatar
Steveyboi
also owner seems to want everyone to use his stuff
ain't hell naw you're just spicy
Avatar
see #salty-spitoon please
Avatar
Avatar
suika
ain't hell naw you're just spicy
Yea he's spicy but this time I'm on his side
Avatar
Avatar
ArNeKJ
closed source smh
The Administrator 1/9/2024 7:30 PM
while the source code is not public, you are still allowed to decompile, modify it and redistribute it if you want to i will not get angry if you decompile it and then release a modded version of the decompiled source code
Avatar
Avatar
Steveyboi
also owner seems to want everyone to use his stuff
The Administrator 1/9/2024 7:31 PM
because i worked very hard on it so of course i want people to try it
Avatar
well in this case, putting the source code somewhere would likely make you get more users 🤷‍♂️
7:46 PM
I took a quick look with jd-gui yeah but it's a "pain" for no good reason 😛
7:47 PM
(also, strangely enough, java says the .jar isn't valid when trying to launch it on mac, I'll have to take a closer look I guess)
Avatar
Avatar
Adriweb
I took a quick look with jd-gui yeah but it's a "pain" for no good reason 😛
The Administrator 1/9/2024 7:47 PM
iirc jd-gui is a shitty decompiler
Avatar
eh it's not too bad
7:47 PM
but I also use the one built in in intellij.
7:47 PM
which I believe is better.
Avatar
Avatar
Adriweb
(also, strangely enough, java says the .jar isn't valid when trying to launch it on mac, I'll have to take a closer look I guess)
The Administrator 1/9/2024 7:48 PM
the jar does not have a meta-inf you need to launch it using -classpath
7:48 PM
look inside the batch file if you want the main class
Avatar
right
7:48 PM
i barely even tried, tbh
7:48 PM
just took a peek
7:48 PM
but that makes sense then.
Avatar
Avatar
ArNeKJ
closed source smh
The Administrator 1/9/2024 7:56 PM
i do plan to release the source code of BeuCalc in the near future maybe with v0.6 or the full release of v0.5.x
Avatar
alright cool
Avatar
Avatar
The Administrator
while the source code is not public, you are still allowed to decompile, modify it and redistribute it if you want to i will not get angry if you decompile it and then release a modded version of the decompiled source code
Yeah I understand but that would make modifying the code harder
Avatar
idea: i can move all my keyboard and peripheral handling into my u8_emu fork (basically port all of that code to C) so the python script only does the screen and keyboard press/release handling, and the C code does all the stuff of the core thread (edited)
Avatar
very fast 👍🏿 no module errors
Avatar
Avatar
Steveyboi
idea: i can move all my keyboard and peripheral handling into my u8_emu fork (basically port all of that code to C) so the python script only does the screen and keyboard press/release handling, and the C code does all the stuff of the core thread (edited)
next youre just gonna move everything into c :^)
Avatar
problem: i don't know SDL2
8:08 PM
so i will still use pygame for screen
Avatar
sdl2 is like really easy
8:09 PM
just copy my code its very clean :^)
Avatar
first i'm just gonna port stuff to C first
8:09 PM
its more pain than i thought
Avatar
dont mix it with u8_emu tho so i can merge all the changes
Avatar
yea i won't
Avatar
also fuck the ti30x model i wrote broke the casio model (edited)
8:10 PM
so now all of the models are broken
8:11 PM
the ti models are half-implemented and the casio models have broken display stuff
8:11 PM
and key stuff
8:11 PM
its just all broken
Avatar
i literally have extensive checks for ti mathprint
8:11 PM
like a lot of if config.hardware_id == 6 (6 = ti mathprint)
Avatar
like i get this
8:12 PM
did you get everything working?
Avatar
yup
8:12 PM
i did
8:12 PM
ill try getting it working today ig (edited)
Avatar
actually not the kb
Avatar
wait the kb is like
8:12 PM
the only thing im missing
8:12 PM
so like the only thing in general
8:12 PM
kb and output
Avatar
me too lazy to implement keyboard
Avatar
well my output is still mildly fucked
8:13 PM
and also my input system is broken now
8:13 PM
im trying to make fn keys work
8:13 PM
oh i know why
8:17 PM
fucking hell
Avatar
the broken pixels are x=8..16 y=7
8:32 PM
oh no
8:32 PM
y=8
8:32 PM
weird af
8:33 PM
asan&usban dont complain
8:35 PM
hm
8:35 PM
it looks fine
8:38 PM
shit
8:38 PM
i stashed, issue persists
8:38 PM
time to get an older version
8:38 PM
its okay at 1ebf16f47f780f37e98c4f37807a2120547715fd
8:40 PM
its okay at 21b17e3c8e0b3ec10e25189b291a0e24d461b7c6
8:42 PM
its broken by ebc3e3e9aa17642e53eceb670765cfdd979f0575..c651ab62af2d3f83949392da5723a636700fdcb9
8:48 PM
8:48 PM
i a stupid
Avatar
bruh
Avatar
i remember this problem a while ago; isn't the problem caused by and operator taking priority? if (stpacp & 0xa0 == 0xa0) stop_accept[1] = true; else if (stpacp & 0x50 != 0x50) stop_accept[0] = false;
9:25 PM
looks like yeah
9:25 PM
this is why i hate C
Avatar
just use parentheses smh
Avatar
Avatar
Steveyboi
i remember this problem a while ago; isn't the problem caused by and operator taking priority? if (stpacp & 0xa0 == 0xa0) stop_accept[1] = true; else if (stpacp & 0x50 != 0x50) stop_accept[0] = false;
a good ide will throw an error there
Avatar
spent some time implementing a screenshot function into my emulator. finally got it to work, heres some sample images
🤩 1
Avatar
GammaVelorum 1/14/2024 2:02 PM
the status bar looks so low res in comparison
Avatar
Avatar
Steveyboi
spent some time implementing a screenshot function into my emulator. finally got it to work, heres some sample images
very cool
6:22 PM
ill have to do that now too :nooo:
Avatar
another image i took
6:23 PM
note the pixel and status bar sizes are taken from the config file
Avatar
lol wtf
3:28 PM
sdl is so bad
3:28 PM
i want to get the post-shifting key
3:28 PM
and you just
3:28 PM
cant???
Avatar
i have implemented bindings on +
4:21 PM
okay yeah cool this all works
4:21 PM
ish
Avatar
but i broke my fx83gt+ model somehow
4:40 PM
okay its not the device model (edited)
4:40 PM
its the png loader?
4:42 PM
okay weird af
4:42 PM
resampling the color palette to white/black makes the display draw correctly?
4:44 PM
okay
4:44 PM
that bug is fixed now
4:44 PM
the key viewer still dies tho (edited)
4:46 PM
me: why does my code not work?
4:46 PM
also me: c++ Maybe<img::Image> loadpng(img::Format f, uint8_t* img, size_t imglen, double ds) { int x, y, channels; uint8_t* dat = stbi_load_from_memory(img, imglen, &x, &y, &channels, 3); if (channels != 3) { err("non-3-channel image data is unsupported (build with libcairo instead)"); return {}; } uint8_t* imgbuf = new uint8_t[x * y * 4]; free(dat); return img::Image{imgbuf, uint32_t(x), uint32_t(y), 1}; }
4:46 PM
the cairopng code does basically the same thing too lol
4:49 PM
cool everything works now somehow
4:50 PM
well except the ti model but thats fucked in so many ways anyway
Avatar
i now have a very cool bugtracker: https://todo.malwarez.xyz/~pitust/wwce
Avatar
got indicators working
9:19 AM
still broken when pressing a key
Avatar
i see
3:36 PM
im gonna work on more bugs from my bugtracker (edited)
Avatar
Avatar
Steveyboi
still broken when pressing a key
i wonder why this happens...
Avatar
do you update on svc? (edited)
3:41 PM
or just randomly
3:41 PM
or how
Avatar
Avatar
pitust
do you update on svc? (edited)
version control software?
3:41 PM
the instruction?
Avatar
uhhhh idk whats that.... :/
3:41 PM
whatever the special pv instruction is
3:41 PM
idr
Avatar
oh you mean SWI?
3:42 PM
or
Avatar
swi (edited)
3:42 PM
yeah
3:42 PM
too much arm
Avatar
yea i do...
3:44 PM
i check SWI on every step
Avatar
Avatar
Steveyboi
still broken when pressing a key
so for some strange reason only Prio and Pro have this problem, Plus does not
10:08 PM
10:08 PM
unfortunately i have yet to implement SWI #5 which is related to key repeat
10:09 PM
so i can't use keys that can be pressed multiple times yet (e.g. sin, cos, tan)
Avatar
okay wwce can now create rom8 files from configs
Avatar
$ obj/wwce-as -pc 0 'mov r1, 0x34' 0134 mov r1, 0x34 wwce's integrated assembler is now actually exposed and like half-working (edited)
8:40 PM
still no symbols
8:40 PM
but
8:40 PM
im semi-close-kinda-not really
Avatar
hope you aren't forced to use the high quality syntax
Avatar
Avatar
Steveyboi
hope you aren't forced to use the high quality syntax
my syntax is the only right syntax!!!!!
8:40 PM
now with even more weird shit
8:40 PM
oh you want ea+?
8:40 PM
no, you are getting ea!
8:41 PM
actually fine i did ea+
8:41 PM
but yeah the syntax is the pitust very high quality syntax
8:41 PM
because cbf
8:42 PM
ill add it to the todo list tho
Avatar
tbh it would be nice for the todo list to shrink for once
8:50 PM
but theres a whole bunch of stuff thats all part of one thing
8:50 PM
like all the changes around asm8/dasm8 tables, ePS support, and ropchain generation all require a new abstraction around architectures
Avatar
Where did ea! even come from
9:06 PM
I saw (hl+) from GB-Z80, (a7)+ from M68k, but no I've never seen ea! (edited)
9:08 PM
(No I'm not blaming anyone, I'm just curios about this syntax, it's new to me & doesn't immediately make sense to me)
Avatar
Avatar
ArNeKJ
Where did ea! even come from
arm
9:13 PM
kinda
9:13 PM
ldr x1, [x0, #4]! (edited)
9:14 PM
just dont ask too many questions about this syntax choice
9:14 PM
im doing ea+ now because it isnt even hard
Avatar
Ah okay
Avatar
okay so my debugger now includes some help (edited)
Avatar
so i could work on something useful
5:32 PM
or i could add a 3rd disassembler to my emulator (edited)
Avatar
jfc why do you need to pack an immediate into two fields
6:21 PM
as in this (bl) (edited)
Avatar
Avatar
pitust
jfc why do you need to pack an immediate into two fields
i think bc Cadr is just CSR:PC, the nibble part is the CSR and the second word is the PC
6:41 PM
still
Avatar
hmm i need to figure out how to deal with sysregs like ea+
6:56 PM
or something
Avatar
Avatar
pitust
jfc why do you need to pack an immediate into two fields
16-bit fixed instruction length
7:24 PM
If you look at bit pattern of instructions you'll see significant nibble & least significant nibble of all instruction words do not contain parameters
7:24 PM
(that's why my emulator uses that as the index of an 256-byte LUT) (edited)
Avatar
Avatar
ArNeKJ
16-bit fixed instruction length
actually i dont think its that
Avatar
Avatar
ArNeKJ
If you look at bit pattern of instructions you'll see significant nibble & least significant nibble of all instruction words do not contain parameters
nope
8:00 PM
ld r8, [er14 + disp8] is encoded bi [01jj jjjj] (edited)
8:01 PM
mov r8, imm is encoded 0ijj
Avatar
Avatar
pitust
nope
Oops, um... at least most instructions do?
8:19 PM
I was trying to make sense out of OKI's processor lol
Avatar
@SteveyboiYour emu code can't not compile on macOS. How to solve it? (edited)
Avatar
thats not mine, and i don't think the code is even designed for macOS
Avatar
Avatar
461065836
@SteveyboiYour emu code can't not compile on macOS. How to solve it? (edited)
try my emu
10:22 PM
it SHOULD build correctly on macos
10:24 PM
source (edited)
362.8 KB
10:24 PM
oh ugh you need kconfig-frontends (edited)
Avatar
Avatar
461065836
@SteveyboiYour emu code can't not compile on macOS. How to solve it? (edited)
try just use ninja and maso command without the build % ninja
3:06 AM
thats the prompt
Avatar
Avatar
totalynce
try just use ninja and maso command without the build % ninja
like the default macos prompt
Avatar
try a didfferent shell? zsh might have soome unwanted flags set
3:07 AM
no
3:07 AM
its the macos default
Avatar
Avatar
pitust
try my emu
Avatar
cringe
Avatar
"works" for me as far as compiling and launching goes (after removing pywin32 from the reqs, and commenting out the VIDEODRIVER env var override), but something crashes with the SDL window
8:46 PM
maybe something isn't inited properly first or whatever idk
8:47 PM
but also which emu were we talking about lol
8:47 PM
Avatar
Avatar
Adriweb
but also which emu were we talking about lol
the new guy was talking about user's emu
9:48 PM
also do you have the ROM and interface images in the correct place
Avatar
jfc how hard is it to write a working emulator
10:16 PM
reminder that wwce actually works on macos
10:16 PM
and therers only minor changes needed to make it work on windows
Avatar
Avatar
pitust
reminder that wwce actually works on macos
that guy may have said thanks before trying to build the emu
Avatar
Avatar
pitust
and therers only minor changes needed to make it work on windows
skeptical
Avatar
Avatar
Steveyboi
that guy may have said thanks before trying to build the emu
its actually not that bad
Avatar
Avatar
Steveyboi
skeptical
no but like fr
10:17 PM
you need mingw
10:17 PM
and pkgconf
10:18 PM
and replace "OSUnixy" with "OSWin32" in one place (edited)
10:18 PM
and install minifb
10:18 PM
and also you need kconfig-frontends
Avatar
Avatar
Adriweb
"works" for me as far as compiling and launching goes (after removing pywin32 from the reqs, and commenting out the VIDEODRIVER env var override), but something crashes with the SDL window
Looks like apple doesnt want you to use the main thread?
4:47 AM
no'
4:48 AM
thats totally what you should use
Avatar
It says like bad access
4:48 AM
Idk
4:48 AM
I kinda hate apple
4:48 AM
EXC_BAD_ACCESS means null pointer deref
4:49 AM
obj_msgSend is the objc message lookup
Avatar
Ok
Avatar
so its like doing
4:49 AM
[someNullObject doStuff] (edited)
4:49 AM
probably because sdl doesnt check errors
Avatar
Wouldn't there be a flag that can be set to bypass errors?
Avatar
how would that work lol
Avatar
(gui stuff have to be on the main thread however)
Avatar
Avatar
Adriweb
(gui stuff have to be on the main thread however)
actually no
4:50 AM
they have to stay on one thread
4:50 AM
but it doesnt have to be the main thread
Avatar
Is the error from sdl2
4:51 AM
they try creating a window and it fails
4:51 AM
because
4:51 AM
idk
Avatar
Avatar
pitust
but it doesnt have to be the main thread
pretty sure it's actually enforced by the system
4:51 AM
First off, I'd like to clarify that I'm not talking about concurrency here. I fully understand that having multiple threads modify the UI at the same time is bad, can give race conditions, deadlocks,
Avatar
not that I have myself tried to do anything different, but
Avatar
interesting
4:52 AM
either way this is the main thread
Avatar
yeah might not apply here if there's no mt going on.
4:53 AM
err
Avatar
this is probably a massive emulator skill issue
4:53 AM
my code works just fine on macos
Avatar
the backtrace says it's on thred #2 😄
Avatar
oh huh
Avatar
Avatar
pitust
my code works just fine on macos
wwce?
Avatar
when I downloaded the zip, it was just symlinks inside 💀
4:54 AM
jfc im sure i know how to create a tarball without symlinks
Avatar
let me try a cli extraction in case that gui program was broken
4:54 AM
yeah nevermind it's fine
Avatar
this is definitely the right thing
277.01 KB
4:55 AM
unzip, git clone, ./x
4:55 AM
well actually first you need kconfig-frontends
4:55 AM
its a mess
4:55 AM
its a bit less of a mess with my new http config stuff but thats still not ready yet
Avatar
k I built it and installed it
4:57 AM
now what
Avatar
./x nconf
4:58 AM
you need pkgconf, sdl2 and maybe some other stuff
4:59 AM
it "should" just work
Avatar
well I have pkg-config obviously but not the dev files I guess
4:59 AM
libpkgconf/iter.h isn't found
4:59 AM
doesn't seem to be installed by the brew package
Avatar
pkgconf
4:59 AM
not pkg-config
4:59 AM
two different things :^)
Avatar
oh, oops
Avatar
rm -rf obj/Fence and ./x
Avatar
rip it conflicts with pkg-config
Avatar
they are compatible
5:01 AM
you can nuke pkg-config and install pkgconf (edited)
5:01 AM
(also the conflict is max cringe)
5:01 AM
i need pkgconf because thats the magic totally not cursed way i use to discover dependencies
Avatar
mkay guess i'll try
5:01 AM
we'll see if my dev env breaks
Avatar
it shouldnt
5:01 AM
arch ships pkgconf instead of pkg-config
Avatar
mkay I guess it all worked fine
5:03 AM
nice TUI
Avatar
its kconfig-frontends
5:03 AM
which is ultimately stolen from linux (like, the kernel) (edited)
5:04 AM
so you get a nice tui, at the cost of it being maximum pain to work with
5:04 AM
anyway then what
Avatar
rip E: different linker and compiler target!
5:05 AM
tried another linker (there were duplicates in the list btw), and now: E: third_party/u8_emu/src/core does not resolve to anything (edited)
5:05 AM
hmm
5:06 AM
clang/ld should be fine, but it doesn't like it
5:06 AM
also I have zig, but it only lists it for win and linux lol
5:07 AM
git submodule init
5:07 AM
git submodule update
Avatar
Avatar
Adriweb
also I have zig, but it only lists it for win and linux lol
yeah i have zig wired up for crosscompiling
Avatar
Avatar
Adriweb
clang/ld should be fine, but it doesn't like it
wrong ld :^)
5:07 AM
you need ld64
5:07 AM
because
Avatar
yeah I figured lol
Avatar
pitust quality code
Avatar
anyway yeah I have a handy submodules thing in my history
5:07 AM
git submodule update --init --recursive --force && git clean -xdf && git submodule foreach --recursive git clean -fdx && make clean lol
5:07 AM
these options shouldn't appear but they do because uh bugs
5:08 AM
i fixed it earlier today but i didnt push it yet
Avatar
ok stuff built
5:08 AM
what's next 😛
5:09 AM
and then obj/wwce-emu path/to/rom
5:09 AM
and hope it actually runs correctly
Avatar
yeah works fine, gg
Avatar
cool!
5:10 AM
actually somewhat surprising tbh
Avatar
how so haha
5:11 AM
(also this is on arm)
5:11 AM
(M2 Max)
Avatar
thats fine
5:11 AM
i tested on arm until a couple weeks back
Avatar
(if you had only tested on intel before, just letting you know)
5:11 AM
ok cool
Avatar
my macos testing was all arm too (edited)
Avatar
status indicators seem to be broken though
5:12 AM
(the top part of the lcd as a whole?)
Avatar
i wouldnt say broken
5:12 AM
id say nonfunctional
Avatar
they looked cropped out idk
5:12 AM
i dont render them
Avatar
alright
5:12 AM
I mean, I can see a pixel 😛 (edited)
5:13 AM
theres like some pngs that need cropping
5:13 AM
and compositing
5:13 AM
its probably not too bad (edited)
5:15 AM
contributions welcome :^)
Avatar
sadly I'm much more of a TI guy than Casio lolz
Avatar
contributions for ti 30x mathprint or whatever its called support are welcome too :^) (edited)
Avatar
damn I fell in the trap
5:17 AM
well actually I'm only focused on graphing calcs
5:17 AM
🤡
5:17 AM
(which is why I contribute to CEmu and Firebird hehe)
Avatar
fx-5800p support?
Avatar
well, TI graphing calcs.
Avatar
also i totally take contributions for new targets :^)))) (edited)
5:18 AM
what isa does ti stuff use anyway
5:18 AM
(as in, how much pain is it)
Avatar
originally when I created MyCalcs it only supported TI graphing calcs
Create and explore your and other people's Graphing calculators collection
5:18 AM
it's now extended to all (yes literally all) graphing calcs that we can possibly hear about
5:19 AM
and most of their accessories
5:19 AM
soon we'll add sufficently-high-end dot-matrix calcs too 🙂
5:19 AM
so a whole lot of Casios
Avatar
cool, cool
Avatar
emus might be useful to test some features
Avatar
oh TIs are arm9s
Avatar
although critor already did pretty much all of the work
Avatar
that sounds
5:20 AM
annoying
Avatar
for the nspires yeah it's arm
5:20 AM
for the old 82/83/84 it's z80
5:20 AM
for the CE it's eZ80
Avatar
then im probably not gonan support that
5:20 AM
z80 maybe
Avatar
for the 89/92/v200 its m68k (edited)
Avatar
isnt m68k big endian
Avatar
I: mem: 0xf024 <- 0xf I: mem: 0xf025 <- 0x0 I: mem: 0xf020 <- 0x9e I: mem: 0xf021 <- 0x7 I: mem: 0xf025 <- 0x1 I: mem: 0xf024 <- 0x1 I: mem: 0xf025 <- 0x0 I: mem: 0xf020 <- 0xa0 I: mem: 0xf021 <- 0xf I: mem: 0xf025 <- 0x1 what do all these writes do?
Avatar
no idea, maybe interfacing with hardware
Avatar
on an emulator rom? (edited)
Avatar
I: mem: 0x8e00 <- 0x27 ???
4:01 AM
wtf
4:04 AM
oh
4:04 AM
right
Avatar
okay cool so now i got my emu working again, now with more knockoff lua! (edited)
Avatar
I Like Tortoises🐢🐢 1/29/2024 10:14 AM
The disadvantage when I use emu on iPad
Avatar
so use ifon
Avatar
I can use on my ipad
11:48 AM
Oh the double tap
Avatar
So I tried the classic sqrt( frac thing in "basic overflow" on my emulator
1:38 PM
After I pressed [=] the lower part of the screen is invisible
1:38 PM
gwetm Does your frontend emulate LCD height SFR? Nvm I see the code that crops the LCD (edited)
1:45 PM
Guess now is refactory time - My memory space emulation is junk, strcpy expects a \0 at 8E00h but that byte is writeable in my emulator so it proceeds all the way down to SFR area 🤦‍♂️ (edited)
Avatar
Avatar
Steveyboi
so use ifon
Go listen to my music its awful 1/29/2024 4:19 PM
Use other web browser like edge[fck the double tap(double tap available on computer agent)] or opera[fck the double tap and top bar(down bar also),may have full sceen modetrollface]
4:20 PM
That why i always play emu on edge instead of Chrome ✅
Avatar
opera aka predatory loan web browser and edge aka antitrust 100% browser?
Avatar
Question for emulator programmers: Where do you get information about CASIO calculator hardware?
Avatar
mostly other people and RE
4:58 PM
and google
Avatar
Oh okay
5:20 PM
I'm gonna do keyboard, STOP and LCD SFRs for my Z80 emulator
Avatar
Avatar
ArNeKJ
I'm gonna do keyboard, STOP and LCD SFRs for my Z80 emulator
why z80?
Avatar
gotta emulate some TI-83+
Avatar
Gotta port that emulator to TI-83+
Avatar
meowcrocontroller 1/30/2024 9:07 PM
emulate ti84 on ti83+
Avatar
Nah, emulate ES PLUS on 83+
9:08 PM
Hope it runs at 5% of real calculator speed LMAO (edited)
9:08 PM
Maybe for SE only
9:13 PM
I didn't arrange the words properly 🤦‍♂️
Avatar
I need invitation code
9:36 PM
Sticker
Avatar
me when u8_emu
Avatar
i love how this one instruction is 1/4 of access_mem
9:05 PM
u8_decode is just like, everything is red
Avatar
12% perf gain diff --git a/src/core/instr.c b/src/core/instr.c index 9efcb6d..a06dfdc 100644 --- a/src/core/instr.c +++ b/src/core/instr.c @@ -205,15 +205,25 @@ static struct u8_instr u8_instr_table[] = { #define NUM_INSTRS sizeof(u8_instr_table)/sizeof(struct u8_instr) -struct u8_instr *u8_decode(uint16_t instr) { +static uint16_t andbits[NUM_INSTRS], eqbits[NUM_INSTRS]; +static int did_init = 0; + +void u8_init() { for (int x = 0; x < NUM_INSTRS; x++) { // Generate the mask uint16_t mask = 0; if (u8_instr_table[x].op0.handler != NULL) mask |= u8_instr_table[x].op0.mask; if (u8_instr_table[x].op1.handler != NULL) mask |= u8_instr_table[x].op1.mask; mask ^= 0xffff; - - if ((instr & mask) == u8_instr_table[x].mask) return &u8_instr_table[x]; + andbits[x] = mask; + eqbits[x] = u8_instr_table[x].mask; + } + did_init = 1; +} +struct u8_instr *u8_decode(uint16_t instr) { + if (!did_init) u8_init(); + for (int x = 0; x < NUM_INSTRS; x++) { + if ((instr & andbits[x]) == eqbits[x]) return &u8_instr_table[x]; } return NULL;
9:22 PM
this is now the critical code path
Avatar
32% gain
9:45 PM
mostly spends time in mem now
Avatar
Idk maybe just use tables if you want performance (edited)
10:30 PM
64Ki * <entry length> shouldn't be hard for modern computers
Avatar
me omw to update my fu- i mean fork
Avatar
when it comes to combinational logic, LUTs always seem to be a better solution
Avatar
Avatar
pitust
32% gain
uhhh D:\GWE\git\u8-emu-frontend\u8_emu>git apply u8emu.diff error: corrupt patch at line 120
Avatar
Avatar
ArNeKJ
64Ki * <entry length> shouldn't be hard for modern computers
thats not how it works
Avatar
Avatar
Steveyboi
uhhh D:\GWE\git\u8-emu-frontend\u8_emu>git apply u8emu.diff error: corrupt patch at line 120
ill update my fork soon enough
10:40 PM
like ill apply your changes and then ill apply my changes on top
10:41 PM
and also my changes break stuff to make them more fasterer
Avatar
Avatar
ArNeKJ
64Ki * <entry length> shouldn't be hard for modern computers
thats bad for cache
10:41 PM
would probably be unironically worse
10:42 PM
and anyway this is fast enough
10:43 PM
if ((instr & andbits[x]) == eqbits[x]) { this is the most often hit line of code
10:43 PM
this+line above are 18% of runtime
10:44 PM
this memcpy is 7% too memcpy(&val, &core->mem.regions[i].array[addr], size);
Avatar
Avatar
Steveyboi
uhhh D:\GWE\git\u8-emu-frontend\u8_emu>git apply u8emu.diff error: corrupt patch at line 120
it didn't have a newline 💀
10:46 PM
alright how do i use this dirtybloom thing
Avatar
ignore it
10:47 PM
i use it to accelerate some random crap in like one case
10:47 PM
oh and i patched it away for now
10:47 PM
so its not even used
10:47 PM
ill reenable it because it helps a lot for that (edited)
10:48 PM
but whatever
10:48 PM
idk i dont think that matters much anyway
10:48 PM
you should implement codemem regions tho
Avatar
well, i do
Avatar
no like
10:48 PM
the special new codemem region thing (edited)
10:49 PM
also plz dont just apply my patch to your fork :^)
10:49 PM
ill push like
10:49 PM
when im happy with the gains
Avatar
Avatar
pitust
also plz dont just apply my patch to your fork :^)
too late
10:49 PM
i applied it lol
10:49 PM
(didn't commit)
Avatar
ah yeah
10:50 PM
this is just wip stuff
10:50 PM
but also, 30% gains :^)
10:50 PM
honestly i dont think i can make mem faster (edited)
Avatar
How to get an on fx-880btg ?
Avatar
and also my changes are mega ugly
Avatar
Avatar
anemos
How to get an on fx-880btg ?
move channels
Avatar
i mean in emu
Avatar
find on TVMT
Avatar
i should sort the insns
10:54 PM
sh perfwrap.sh obj/wwce-testrun ran 1.18 ± 0.05 times faster than sh perfwrap.sh obj/wwce-testrun.old
10:54 PM
welp
10:54 PM
another 11% gain
10:54 PM
u8_step now has more overhead than u8_decode
Avatar
also i need the mem struct to be cross compatible with the existing one ^_^
Avatar
wdym?
10:55 PM
as in that you can use the old core with new pyu8emu or whatever?
Avatar
like make it so that you don't need to rewrite the code to make it work with the new stuff
10:56 PM
codemem is a pretty small change
10:56 PM
but its significant
10:57 PM
4%
10:57 PM
okay its not that significant
11:00 PM
okay so we will pretend that wwce code is very high quality
11:00 PM
and i didnt get a 30% perf gain by not copying the core around
11:02 PM
it wasnt 30% tbf
11:02 PM
only 11%
11:02 PM
and another 5% by not repainting the display every 1ns
Avatar
Avatar
pitust
thats bad for cache
Hm okay then
11:47 PM
I'm not that familiar with optimisation TBH
11:49 PM
I'm happy that my emulator is gonna run on a cache-less system, but I'm also unhappy that the Z80 in my 83+SE doesn't have cache
11:52 PM
I've probably asked here before, but: Would stealing flags of host processor make the emulator faster?
11:52 PM
Maybe also MMU in case of x86?
Avatar
Avatar
ArNeKJ
I've probably asked here before, but: Would stealing flags of host processor make the emulator faster?
it would maximize pain
Avatar
Idk, probably something like sahf \ <do calculation here> \ lahf and then store AH to somewhere else
8:08 AM
I did a perf thing for my emulator once and the hotspots are memory access & decoding logic
8:09 AM
I also checked asm and gcc didn't figure out what I wanted to do and used 50+ commands for each operarion while all of that could simply be done in 1 or 2 instructions lol
Avatar
Avatar
ArNeKJ
I did a perf thing for my emulator once and the hotspots are memory access & decoding logic
yep
2:19 PM
im basing these optimizations on perf traces
Avatar
Avatar
ArNeKJ
Maybe also MMU in case of x86?
page sizes dont line up nicely
2:21 PM
i thought about playing mmap games (edited)
2:21 PM
but its (a) hard (b) nonportable (c) almost definitely not worth it
2:23 PM
the whole instruction sort thing is there to make it more likely you can decode by checking less instructions (edited)
Avatar
Avatar
ArNeKJ
Idk, probably something like sahf \ <do calculation here> \ lahf and then store AH to somewhere else
yeah so the issue with that is (a) it doesn't really play nicely with C code
2:26 PM
and (b) its a dependency chain
2:26 PM
fetch flags -> sahf -> compute -> lahf -> store flags
2:27 PM
(zen4) apparantly lahf and sahf arent even that expensive huh
Avatar
okay @Steveyboi you can maybe pull my fork? i reordered the structs some more tho (edited)
3:19 PM
oh and nonfunctional dirty bit stuff :^)
Avatar
i can't auto merge
3:35 PM
oops
3:36 PM
didn't mean to open pull request
3:40 PM
ugh dammit have to rewrite my darn frontend
3:40 PM
and readd breakpoint related fields
Avatar
why?
3:43 PM
also the dirty bit thing is broken lol
Avatar
Avatar
pitust
why?
my frontend has write breakpoints and SWI detection
Avatar
write breakpoints?
3:46 PM
i kept the swi thing
Avatar
yea
Avatar
that commit got in
Avatar
have to go now ^_^
Avatar
and the dirtybloom thing was intended for write breakpoints
3:47 PM
lol 40% of run time compressing screenshots
Avatar
Avatar
pitust
and the dirtybloom thing was intended for write breakpoints
uhh so how to use it?
Avatar
first pull the even more newer changes
4:42 PM
then on any write it will reset the value to bitand(old value, 2) if theres a write
4:42 PM
so like, reset no breapoint -> 0 yes breakpoint -> 3
4:42 PM
and then you just check the list
4:42 PM
instead of every breakpoint
Avatar
also whats with all the "builtin" functions
Avatar
compiler hints
Avatar
i kinda want to try doing 5800p too (edited)
Avatar
fx-5800P is not too hard to emulate
Avatar
i see
6:24 PM
also where are all the bcd peripherals?
Avatar
for CWII?
Avatar
the code is on my private github repo
Avatar
bcd.py?
Avatar
yes
6:26 PM
doesn't work yet
Avatar
oh god (edited)
6:26 PM
i see i see
Avatar
the unnamed_function_ names come from ghidra WASM plugin
Avatar
402, 404, 400, 405? (edited)
Avatar
yea they seem to be the main control registers
Avatar
i see
6:27 PM
400+n -> BCDCTLn ig (edited)
Avatar
Avatar
pitust
fetch flags -> sahf -> compute -> lahf -> store flags
IDK maybe just go JIT lol
Avatar
yeahhh
6:30 PM
im thinking of going full jit
6:30 PM
but thats haaard
6:31 PM
also meh its fast enough for now
Avatar
now I'm doing some 6502 emulation because of random netizens lol
Avatar
;calc 01030106
Avatar
Avatar
pitust
;calc 01030106
I: took 22ms
Avatar
22ms
Avatar
fast enough
Avatar
should probably call google bard for help again
Avatar
lmao
Avatar
ahhhhhh
6:37 PM
actually one of the drafts is literally 2 lines xd
6:37 PM
6:40 PM
shiet (edited)
6:40 PM
(less variables is my coding style don't ask pls)
Avatar
@Steveyboi can you send the raw wasm?
Avatar
ok nvm
7:47 PM
this is silly
Avatar
im having trouble running the wasm in a nodejs env
Avatar
like my register writes dont read back
Avatar
okay now i get -1 instead of 0
5:44 PM
after i wrote a fake fetch layer
Avatar
return if (26840[0]:ubyte != 0 & 26844[0]:int != -1) { 24224[0]:int = 1; 0; } else { -1 }
5:51 PM
lmao
5:52 PM
export function U():int { return if (26840[0]:ubyte != 0 & 26844[0]:int != -1) { f_jh() } else { -1 } }thats execute
Avatar
its just a frontend function that calls the actual execute function
Avatar
the values are 1 0 tho?
Avatar
Avatar
Steveyboi
its just a frontend function that calls the actual execute function
yea
5:53 PM
oh no
5:53 PM
1 -1 (edited)
Avatar
bruh
Avatar
interesting
5:54 PM
f_jh is actual logic
5:54 PM
ah yeah and if i dont do fetch stubs i get 0 everywhere but its 1 0
5:55 PM
export function S():int { var a:int_ptr = g_a - 16; g_a = a; a[3] = 24220[0]:int; var b:int = a[3]; g_a = a + 16; return b; } this is GetCount hmm
5:55 PM
they dont load 26840 (edited)
Avatar
fyi it just returns cycle count from CU8Bcd struct
Avatar
export function T():int { return if (26840[0]:ubyte != 0 & 26844[0]:int != -1) { 24213[0]:ubyte } else { -1 } } and yeah most of the others (GetSimRun here) wont do anything unless the values are 0 and -1
Avatar
Avatar
Steveyboi
fyi it just returns cycle count from CU8Bcd struct
bcd?
Avatar
sorry i meant CRegister
5:56 PM
mixed them up
Avatar
function f_eaa() { 26840[0]:byte = f_zz(); f_qz(); } the first one is set here
5:57 PM
the second one is set in f_iy
Avatar
btw the bcd peripheral function is func_830 iirc
Avatar
ok hmm
5:58 PM
sadly wasm-decompile doesnt label functions the same way
Avatar
bruh
5:58 PM
i use ghidra its much better [not an ad i swear]
5:59 PM
meh
5:59 PM
oh setting syntax to C# makes it look nice
6:00 PM
export function ca(a:int, b:int):int { return if (26840[0]:ubyte != 0 & 26844[0]:int != -1) { f_nfa(a, b) } else { -1 } } ReadReg
Avatar
the f_nfa i name it read_regtype
Avatar
f_nfa is just f_ReadReg
6:02 PM
ca is a wrapper
Avatar
oh wait fuck
6:03 PM
ah yeah i remember read regtype returns the value
6:03 PM
doesn't put it in an outptr
Avatar
oh okay
6:04 PM
so i figured out why i was getting a zero there
6:04 PM
(api misuse)
6:04 PM
okay next question
Avatar
ig "wheres the bcd peripheral func" (edited)
6:05 PM
im planning to write some u8 asm
6:05 PM
and just blackbox probe it
6:06 PM
why is my call to WriteCodeMemory going wrong
6:06 PM
WriteCodeMemory(dest, len, src)
6:07 PM
okay
6:07 PM
i was writing uint16s as uint8s
6:07 PM
now im getting an infinite loop properly
6:07 PM
time to fix my u8 assembler to not suck
6:08 PM
okay its my disassembler being bad
6:09 PM
perfect
6:09 PM
that was a rather silly bug ngl
6:09 PM
time to symbols?
Avatar
ok the bcd peripheral function is f_an
9:51 PM
and f_hea is unnamed_function_813
Avatar
followed cracking guide and worked :) nice
Avatar
damn still getting 0xf0000005 error despite patching EXE
2:51 AM
will take 2
Avatar
still happens </3 man
Avatar
Avatar
doot
damn still getting 0xf0000005 error despite patching EXE
tf???
7:36 AM
hmm, you can always go back to an earlier revision
7:37 AM
iirc the first version of the guide actually works
Avatar
this is exactly what i followed :') there are tons of revisions to the page, where should i be looking for a different ver? or do you mean earlier revision of the calculator like (01.00.0000.0000) as opposed to (02.01.0030.0000)
Avatar
no
8:08 AM
page history
Avatar
Avatar
doot
this is exactly what i followed :') there are tons of revisions to the page, where should i be looking for a different ver? or do you mean earlier revision of the calculator like (01.00.0000.0000) as opposed to (02.01.0030.0000)
>there are tons of revisions to the page and a lot of them have slightly differing instructions it seems? not sure, i'll try again tomorrow with some different page versions and see if i have any luck
Avatar
also before i go about trying to code my own - is there any programs around that can take a list of inputs and play them out to the emulator? think i remember seeing one on a video sent here but i'm not sure
Avatar
macro recorder
Avatar
ooh alright ty :)) i'll bookmark it and let you know if i have any luck tomorrow
Avatar
Avatar
Steveyboi
macro recorder
like tinytask or something? that could work but it'd be cool to have it take [ALPHA] as instruction 1 and send a message to the emulator window which would automatically click on the spot i'll have to play around with getting it working with ctypes or something - that way i could easily edit the instruction list
Avatar
this one :p
8:14 AM
if you want it your way you can use https://e.20142022.xyz but keep in mind these emulators don't 100% mimic real hardware in glitches
Avatar
Avatar
Steveyboi
if you want it your way you can use https://e.20142022.xyz but keep in mind these emulators don't 100% mimic real hardware in glitches
this place asks for an invite code on signup ahah and yeah, i noticed i couldn't really get into diagnostic due to the lack of being able to hold down multiple things at the same time (since the keyboard just spams the held key instead)
Avatar
its bc casio uses a different keyboard system for their emulators, in which you can't hold multiple keys and they also have ROMs only for their emulators (known as emulator ROMs) which would use this keyboard system and has some other changes (e.g. [SHIFT] [AC] disabled) the current emulator ROMs we have all have the diagnostic mode code intact, however the check for SHIFT+7 still uses the real hardware keyboard system so you can't access it on official emulators (edited)
Avatar
i assume stuff like spelling would still work fine on emulators since there's not much holding down keys in it and i've seen ROP working fine in them i mainly wanted to patch the 991EX emulator since constantly repeating all the steps gets tiring when i mess up once and if i get some decent automation on it, it'd be way faster for me to experiment lol
Avatar
keep in mind the official emulator ROMs are different from the real ROMs used on real hardware
Avatar
is there an emulator for the fx-82au plus ii second edition
10:04 AM
i know theres one for the 1st edition
10:04 AM
but is there one for the 2nd
Avatar
Avatar
kribit
is there an emulator for the fx-82au plus ii second edition
yes
Avatar
which one is it
Avatar
official emulator
10:07 AM
where do i get that from
10:07 AM
is this not the official emu
Avatar
every ROM on https://e.20142022.xyz is extracted from official emulators
10:09 AM
and you can get fx-82AU+ II 2nd edition offline official emulator on https://edu.casio.com/softwarelicense/index.php (edited)
Avatar
Avatar
Steveyboi
and you can get fx-82AU+ II 2nd edition offline official emulator on https://edu.casio.com/softwarelicense/index.php (edited)
using ctr+f ont his page and typing fx-au nothing shows up
Avatar
AU+ is part of ES PLUS series
Avatar
found it
10:15 AM
thnx
Avatar
Avatar
kribit
using ctr+f ont his page and typing fx-au nothing shows up
Dont have the fx-82 no dash just search au
Avatar
the AU PLUS text is in a dropdown, you cannot search for it
Avatar
Yeah I found it
10:52 AM
It’s all good
Avatar
whats this?? code memory doesn't support callbacks???
4:17 PM
aaaargh
4:17 PM
i hate my life
Avatar
you mean with my fork?
4:18 PM
yes?
4:19 PM
the benefit is that the code reads are faster
4:19 PM
marginally but still (edited)
Avatar
but downside... i want my sweet out of region 0xff bytes :((
Avatar
just set them to 0xff?
Avatar
would cost memory..
Avatar
bro its like
4:20 PM
a couple k
4:20 PM
its nothing
4:20 PM
or you can do mmap and signal tricks to make it ~free
Avatar
either way i'm kinda sad that my code callbacks are useless now
Avatar
but speedz!
Avatar
aand no respect for big endian because https://youtu.be/WOzcPT1Ec6U?t=6
4:25 PM
i do handle big endian
Avatar
uhhh this #if defined (__LITTLE_ENDIAN__) || defined (__x86_64__) || defined (__i686__) || defined (__aarch64__) ... #else #error big endian is not big fast! #endif
Avatar
and also big endian isnt real unless you are running on a wifi router
4:26 PM
oh
4:26 PM
okay fine
4:26 PM
ill fix that soon
Avatar
still dunno how to properly use the dirty thing, and also the fact that i use callbacks for SFR reads/writes (edited)
4:54 PM
so uh i'll just redo the last write thing instead
Avatar
boom, i made a brand new breakpoint manager
6:43 PM
now you can have multiple breakpoints (of same type) at once (edited)
Avatar
Avatar
pitust
or you can do mmap and signal tricks to make it ~free
Wouldn't that be bad for cache?
Avatar
Avatar
Steveyboi
boom, i made a brand new breakpoint manager
Ooh this is nice!
Avatar
Avatar
ArNeKJ
Wouldn't that be bad for cache?
it would be slow to access (edited)
7:05 PM
but that doesnt matter
Avatar
oh my gosh finally
Avatar
what about that cursor
Avatar
i think he jumped to a part of code, since its after disabling the cursor
2:36 PM
Oh great at some point I broke checksum calculation
3:21 PM
nvm I was just being stupid
Avatar
991 esp is 8928
Avatar
Yes, that's because the model name(GY454X)
Avatar
570esp
Avatar
  • 570esp(GY454X): 8929
  • 991esp(GY455X): 8928
See the differences?
3:39 PM
'4'+9 == '5'+8, that's the relationship between their checksum & model name
4:07 PM
you can see that with cy213 and cy214 too
Avatar
and other model groups
4:33 PM
i also confirmed it with GY465X and LY720X as well
4:35 PM
though EY is different, since the version strings are stored twice in the ROM (the first EY string is hard coded into the checksum code, the version string is stored as an ordinary string at the start of the ROM which the checksum code reads from. the version at the end of the ROM is only used for checksum calculation and the calculator ID.) (edited)
Avatar
nice progress
Avatar
Avatar
ArNeKJ
Click to see attachment 🖼️
is this on some weird platform?
9:19 PM
or
9:19 PM
im trying to implement bcd again
9:19 PM
i have a tool (simlibwrap) which blackbox probes their wasm blob (edited)
9:19 PM
but its massive pain
Avatar
Avatar
pitust
is this on some weird platform?
its in command prompt i think
9:20 PM
its just a small size
⬆️ 1
Avatar
Avatar
pitust
i have a tool (simlibwrap) which blackbox probes their wasm blob (edited)
better to just reverse engineer the code
Avatar
well im not commiting a crime so
9:21 PM
theres that
Avatar
Avatar
pitust
is this on some weird platform?
Nah, just Windows
Avatar
okay i think the reason you usually get a zero is because the bcd unit can copy stuff around (edited)
9:37 PM
inside bcdram only but still
9:42 PM
okay i figured out another command
9:42 PM
i think
9:43 PM
b0(n=0), b1(n=1), b2(n=2), b3(n=3) BCDRAM[n*16:n*16+12] = BCDRAM[current source:current source + 12]
9:45 PM
but there doesnt seem to be a "select 16" insn in the bN block
Avatar
uhh may i ask what function is that (in the wasmdec decompiled code)
Avatar
i dont know
9:46 PM
im not decompiling anything
9:46 PM
also it actually sets from 0:12 i think
9:47 PM
and theres probably other ops for copying to 0:12
Avatar
videochair666 2/19/2024 9:47 PM
Hello
Avatar
hi
9:47 PM
how can i help you?
Avatar
ehlo (edited)
Avatar
videochair666 2/19/2024 9:47 PM
ehllo?
Avatar
okay i dont know what b6 does
Avatar
still have no idea what bN block is
Avatar
videochair666 2/19/2024 9:48 PM
Do you want say vietnamese?
9:48 PM
you know bcdcmd
Avatar
Avatar
videochair666
Do you want say vietnamese?
no
9:48 PM
bcdcmd = bcdctl0 = 0xf400
Avatar
aaaaa
9:48 PM
ok
Avatar
[bcdcmd] = 0xb0..0xb3 are ops
Avatar
videochair666 2/19/2024 9:48 PM
whyyy
Avatar
also u shouldnt post in random channel where people are talking...
9:49 PM
about other things
Avatar
videochair666 2/19/2024 9:49 PM
Ok
Avatar
okay 0xb8 zeroes bcdram[0:12]
Avatar
hang on lemme clean up my logging
9:55 PM
okay
9:55 PM
the bottom two bits are an operand
9:58 PM
actually, maybe its bottom 3?
9:58 PM
and theres more space i didnt find
10:03 PM
okaaayy
10:04 PM
0xb8 doesnt zero
10:04 PM
its a copy
10:04 PM
with a 32 byte block size? (edited)
10:04 PM
0xb9 copies +64 to +32
10:04 PM
0xbb copies +64 to +96
10:05 PM
waiiiit
10:05 PM
is it a swap or something
10:06 PM
yes
10:06 PM
i think
Avatar
btw i just noticed lapis uses 2 BCDRAM copy functions, but one appears to copy in reverse
Avatar
b0 swaps bcdram+0 and bcdram+64
10:08 PM
how big is bcdram lmao
Avatar
i assumed 128 bytes
10:08 PM
that seems reasonable ngl (edited)
10:09 PM
so 8 registers? (edited)
Avatar
maybe
10:09 PM
also my illegal reimplementation doesn't do the copy
Avatar
okay b0/2 is +n*32 = +0
10:10 PM
i think
10:11 PM
ohh
10:11 PM
ohhhh
10:11 PM
its a move
10:12 PM
its a 32 byte move op
10:12 PM
its 1011 nn mm and mov rM, rN i think (edited)
10:15 PM
i think 1010 is mov imm
10:16 PM
hm
10:16 PM
not sure
10:17 PM
yes
10:17 PM
i think im pretty fucking confident now
Avatar
alright now write docs
10:18 PM
so i can make a legal bcd.py
Avatar
i am working on it
10:19 PM
sigh
10:21 PM
okay now time for cN
10:22 PM
c0 seems to be a shift
10:23 PM
its little endian btw
10:23 PM
so c0 is a shift left for block 0 (edited)
Avatar
advanced off topic hunter 2/19/2024 10:23 PM
just curious, what are you guys working on
Avatar
REing the BCD peripheral in CWII (edited)
Avatar
REing BCD
10:23 PM
as in
Avatar
testing every opcode
Avatar
im shoving random opcodes into it
10:23 PM
and seeing what it does
Avatar
advanced off topic hunter 2/19/2024 10:24 PM
interesting lmao
Avatar
cN is like sllc
10:24 PM
i think
10:24 PM
with imm=4
10:24 PM
and i guess that means there is an sll too (edited)
10:24 PM
that might be 8 ngl
Avatar
Avatar
advanced off topic hunter
interesting lmao
and i do it the illegal way by literally stealing the lapis decompiled copyrighted code
Avatar
Avatar
Steveyboi
and i do it the illegal way by literally stealing the lapis decompiled copyrighted code
advanced off topic hunter 2/19/2024 10:25 PM
woa woa woa lapis spy incoming
Avatar
i should reexamine 8N now that im more familiar with the bcd stuff
Avatar
advanced off topic hunter 2/19/2024 10:26 PM
uh gn gmt+7 guys
10:26 PM
yeah c4 is sllc imm=8
10:26 PM
interesting
10:26 PM
top nibble is op and bottom nibble is operand?
Avatar
wait the other control regs hold the args right?
Avatar
control regs?
10:27 PM
no
10:28 PM
not as far as i can tell
10:28 PM
you only have bcdram, bcdctl and bcdsel
10:29 PM
i have no idea what bcdsel does
Avatar
btw i prefer BCDCON instead of BCDCTL
Avatar
BCDCTLn
10:43 PM
and BCDCMD
10:43 PM
are my names
10:43 PM
and BCDERR (=BCDCTL16)
Avatar
No idea what you guys are doing, seems very cool
11:47 PM
May I have a nice document about CWII hardware/RAM areas when you are done?
Avatar
maybe
Avatar
Avatar
ArNeKJ
No idea what you guys are doing, seems very cool
its just testing BCD coprocessor opcodes
Avatar
I would try to read the code on the U8 side (edited)
Avatar
all the U8 code does is just read from and write to BCD control registers and copy BCDRAM to main RAM and vice versa (edited)
10:56 AM
i thought i may be able to use this to load SimU8.dll in x64 python and call the bcd peripheral function, but then i remembered the function is not exported... shit (edited)
11:51 AM
@qiufuyu123 is that your Baidu account? This screenshot looks familiar
11:53 AM
Also their emulator can do calculations
11:53 AM
How
11:54 AM
Avatar
looks like this dude managed to reverse engineer the BCD coprocessor before us
Avatar
happy sheep 2/20/2024 12:13 PM
An emulator for nX-U8 based Casio calculators. Contribute to Xyzstk/CasioEmuX development by creating an account on GitHub.
Avatar
WHAT
12:17 PM
oh
12:17 PM
my
12:17 PM
god
12:17 PM
everythings already documented
Avatar
he's like a chad
Avatar
were like microsoft and baidu is like linux, were really behind now
Avatar
chinese community is smarter than our community, i wish i could learn chinese
Avatar
Avatar
ArNeKJ
Click to see attachment 🖼️
that looks so cool
3:16 PM
imgui?
Avatar
Avatar
Steveyboi
everythings already documented
that looks like what you were doing, i. e. hard RE
Avatar
Avatar
pitust
imgui?
yes
3:18 PM
that was done by qiufuyu
Avatar
the chineese stealing all the fun from me
Avatar
Avatar
pitust
that looks like what you were doing, i. e. hard RE
but this guy managed to figure out what all the variables are and actually make it work
3:19 PM
probably gonna steal this
Avatar
and im still blackbox poking
3:19 PM
:/
3:20 PM
but im proooobably not too far
Avatar
Avatar
pitust
but im proooobably not too far
Yeah, your cleanroom thing(IDK what it's called) is cool
Avatar
okay cool now i have a new better differ thing
Avatar
2n is a 12 wide subtract, i think (edited)
Avatar
heh, 3n hangs
5:23 PM
actually they all hang?
5:27 PM
3..7 hang
5:27 PM
so i guess undefined ops? (edited)
5:28 PM
or division or something
5:29 PM
also 2n seems to have a different encoding (edited)
5:35 PM
ugh, i dont think my understanding is very complete
5:38 PM
like the ops i documented as affecting r1 just dont work?
5:38 PM
like the r0 stuff is fine
5:39 PM
oh god
5:39 PM
is my encoder broken
5:39 PM
or what the hell is the issue
5:39 PM
or is the assignment not fixed like i thought it is
5:40 PM
yeahhh
5:40 PM
wait
5:40 PM
its in 32 byte blocks?
5:40 PM
thats a bit silly
5:40 PM
since the actual data is only 16?
5:40 PM
and i documented everything as 16
5:42 PM
okay yeah cool
5:43 PM
yep
5:43 PM
okay
5:43 PM
ooohkay
5:43 PM
0x2 is bcd subtract
5:43 PM
0x1 is bcd add
5:43 PM
and i dont know what 0x0 is yet
5:43 PM
maybe noop?
Avatar
and my recorded trace doesnt include it so i think im good
5:51 PM
hm
5:54 PM
okay time to implement all the opcodes
5:56 PM
starting with shl ig (edited)
Avatar
can you maybe put it on github seperate from the main emulation code
Avatar
when its implemented
Avatar
okay wtf
8:00 PM
im mega confused rn
8:00 PM
ohh nvm
8:04 PM
okay wtf
Avatar
i think im pretty close
Avatar
bitshifts are so annoying
Avatar
oh fuuuck
Avatar
anyway wtf is going on
8:53 PM
maybe i should copy bcd reads and writes to cu8 and see what happens then
8:59 PM
over a tcp socket :^)
9:06 PM
okay fine im doing mempipe
Avatar
oh yea it is definitely hard RE
10:28 PM
the tick function looks almost exactly like mine
Avatar
sry guys
10:06 AM
i haven't check messages for a long time
Avatar
Avatar
ArNeKJ
Click to see attachment 🖼️
can you give me the link?
10:07 AM
i dont think i sent screenshots on baidu
Avatar
Avatar
qiufuyu123
can you give me the link?
ROP snake: https://tieba.baidu.com/p/8873639356 ROP pixel editor: https://tieba.baidu.com/p/8876780676 ROP tetris: https://tieba.baidu.com/p/8889000255 possible universal ROP (tested on fx-JP900CW emulator ROM): https://tieba.baidu.com/p/8899903993 CasioEmuX CWII fork announcement (now i see where the link comes from): https://tieba.baidu.com/p/8902070355
11:11 AM
so it is a new guy named xyzstk
Avatar
ooh 2 player snake
Avatar
Avatar
Steveyboi
ROP snake: https://tieba.baidu.com/p/8873639356 ROP pixel editor: https://tieba.baidu.com/p/8876780676 ROP tetris: https://tieba.baidu.com/p/8889000255 possible universal ROP (tested on fx-JP900CW emulator ROM): https://tieba.baidu.com/p/8899903993 CasioEmuX CWII fork announcement (now i see where the link comes from): https://tieba.baidu.com/p/8902070355
I Like Tortoises🐢🐢 2/21/2024 11:27 AM
I hope they can ROP Doom on that
Avatar
ig they would have to use the abs draw function some how
11:29 AM
cuz thats allready pretty good
Avatar
btw if anyone has baidu account they can ask that guy out and (maybe) promote this server? (nah maybe remove that last part) (edited)
Avatar
|, ,| |||, ,||| |||||-@-||||| |||` `||| |` `| (edited)
Avatar
the dude has a literal pixel drawer
Avatar
okay incredible
7:27 PM
i did mempipe
7:27 PM
and no idea what the fuck is happening
7:31 PM
huh wtf
Avatar
this xyzstk guy is a true chad he put every single needed header, lib and DLL needed for a one-line g++ compile command
Avatar
happy sheep 2/21/2024 9:05 PM
CasioEmuX ported to windows. Contribute to coder114514/CasioEmuX-win development by creating an account on GitHub.
Avatar
uh
9:05 PM
..
9:06 PM
i mean he probably made it so you can just install mingw64 without msys2 and just use the funni command prompt
9:06 PM
(tbh i prefer meson or make)
Avatar
also i havent mentioned its super slow
Avatar
Avatar
Steveyboi
this xyzstk guy is a true chad he put every single needed header, lib and DLL needed for a one-line g++ compile command
thats a little cringe
Avatar
yeah i love installing dependencies
Avatar
oh JESUS CHRIST
10:02 PM
that is mad ugly
10:13 PM
why does bcd not work
10:13 PM
do they dma
10:13 PM
or do they want interrupts
10:13 PM
or what
Avatar
meanwhile: i'm adding log commands to the working hard RE'd code to find out what im doing wrong
Avatar
do you get zeroes?
10:16 PM
or like
10:16 PM
something
10:16 PM
anything
10:16 PM
at this point lol
Avatar
i get 0
Avatar
perfect
Avatar
with 1+1
Avatar
im getting fucking zeroes
10:16 PM
for just "2222" (edited)
10:17 PM
(which is a nice enough test vector because it stands out in hex dumps)
10:17 PM
waitttt
10:18 PM
do they read like main memory
10:18 PM
for ops
10:18 PM
or something
Avatar
Avatar
pitust
do they read like main memory
it doesn't
Avatar
i see
Avatar
i just found this cool new function
10:20 PM
__builtin_FUNCTION() (edited)
Avatar
its not very new
10:21 PM
its been there for a long time
10:21 PM
theres also __func__, __FUNCTION__ and __PRETTY_FUNCTION__ (gcc) and __FUNCSIG__ (msvc) (edited)
10:24 PM
hm
10:24 PM
maybe i should probe a working emulator
Avatar
like that fork
Avatar
either try building that
Avatar
i already did
Avatar
or caduo
Avatar
not sure if this will work c++ void MMU::WriteData(size_t offset, uint8_t data, const char* str = __builtin_FUNCTION()) (edited)
Avatar
it does
Avatar
aaaand i forgot to update it in the header
10:28 PM
dammit
10:30 PM
wait how the fuck do i fix the header
Avatar
okay hardcoding a return "works"
10:31 PM
except not really
Avatar
alright how do i get the function caller namespace 🤔
Avatar
use __PRETTY_FUNCTION__
10:45 PM
and slice up the result
10:46 PM
oh, fuck
10:46 PM
i missed like
10:47 PM
a bunch of registers when i was probing
10:47 PM
i noticed it like now
10:47 PM
bcdfuck0 (f414) and bcdfuck1 (f415)
10:48 PM
they get set to 0x18 after the first shift? (edited)
10:50 PM
oh wait no i wasnt bcdseling properly
10:50 PM
only bcdfuck1 is set now
10:52 PM
i dont seem to be reading back the bcd regs correctly ffs
10:52 PM
oh no i am
10:52 PM
and sometimes bcdfuck0 is set as well
Avatar
bcdfuck0?
10:53 PM
thonk
Avatar
well yes
10:53 PM
how else would i name a register (edited)
10:54 PM
actually BCDFS (f414) and BCDLS (f415) respectively (edited)
10:54 PM
first and last set (edited)
Avatar
oh btw its noted that the functions related to F404 and F405 aren't converted (in the working code) Note:Functions about `0xF404` and `0xF405` are not simulated as they seem to be never called in Casio calculators. (edited)
10:55 PM
also i didnt even know about those regs
10:55 PM
what do they do
10:58 PM
nope still broken
10:58 PM
wait nvm
10:58 PM
i a idiot
10:58 PM
i wrote some new code and didnt call it
Avatar
now i can see why my code doesn't work
Avatar
still zeroes tho
Avatar
I'm gonna learn ncurses and possibly also pthreads, and then make my emulator use less RAM, and then I'll start porting it to TI-83 Plus calculator
Avatar
@Steveyboi can you add a bcd trace to casioemux (like, trace every bcd read and write, with values), evaluate 2222 and send the trace to me?
5:24 PM
oh i fuck my bcdfs and bcdls is still bad
5:29 PM
kinda want to rewrite my bcd model in js tbh
Avatar
Avatar
pitust
@Steveyboi can you add a bcd trace to casioemux (like, trace every bcd read and write, with values), evaluate 2222 and send the trace to me?
sure i can do that, i've already set up BCDRAM write checks
Avatar
also yeah i think im gonna move all the model stuff to js
Avatar
god i hope you wont turn wwce into a browser emulator
5:48 PM
im embedding quickjs
5:48 PM
but the lang i chose to embed sucks mega hard
Avatar
also i need your preferred ROM
Avatar
ey001
Avatar
already got it downloaded from caduo
Avatar
heres your log, the caller is also listed for each read/write, if it is LoadStore it is from U8 code, if not its from BCD code
19.69 KB
Avatar
thank you
Avatar
ur welcome :)
Avatar
FINALLY! SUCCESS
7:06 PM
...well, it can do basic calculations, but not the more complex ones like... sin^-1(cos^-1(tan^-1(tan(cos(sin(9
7:10 PM
im in js rewrite land still
7:10 PM
but i copy pasted a much nicer logging module so i have lots of pretty colors now
Avatar
ah yes quickjs
7:41 PM
aka the "i just blew through 200k of stack space" library
7:41 PM
270k
7:43 PM
ah its the regex engine
Avatar
actually not sure
7:45 PM
jfc
Avatar
okay i just enabled some more optimizations
7:54 PM
maybe that will make me not use 60k of stack per function call
Avatar
okay the js layer works now
8:02 PM
neat
Avatar
okay my new system is way better
8:17 PM
time to reimplement all the bcd crap
Avatar
okay i reimplemented the bcd crap
2:07 AM
and its still fucking broken
2:07 AM
at this point im legit not sure what is the issue
2:10 AM
ill do a log diff tho
2:11 AM
pygments seems to freak out a little on my disassembler, lol
2:14 AM
okay the neat thing is i can now mock up the bcd code
2:14 AM
and see where i diverge
Avatar
okay WTF
2:22 AM
it does not diverge
2:22 AM
ever
2:22 AM
now im mega confused
2:23 AM
if it doesn't diverge, what is the problem
2:23 AM
or maybe it diverges without a write
2:23 AM
hmm
2:25 AM
oh ohhh (edited)
2:26 AM
oh fuuuuck
2:31 AM
okay
2:31 AM
still fucked
2:37 AM
but i do actually complete a reference pass
2:37 AM
like
2:38 AM
i get the right output there?
2:41 AM
so its either: 1. dma 2. irq 3. bcd affects psw? idk maybe...
Avatar
ohhhboy (edited)
2:54 AM
ohh fun
2:55 AM
some bcd-side writes dont show up in the log
2:55 AM
hmm
2:55 AM
no idea what the issue is ngl
3:01 AM
it seems fine
3:01 AM
but its just...
3:01 AM
not
3:06 AM
okay this is CURSED
3:06 AM
the first calculation is broken
3:06 AM
and the rest appear to be fine??
3:10 AM
like okay
3:10 AM
that is just
3:10 AM
weird
3:10 AM
as hell
3:11 AM
but not everything works?
3:11 AM
nevermind
3:11 AM
its the whole "first calculation is broken" thing again lol
3:11 AM
except its still wrong
Avatar
so yeah i think theres some other broken things
3:27 AM
maybe im not doing statuses quite correctly or leaving some garbage in memory
3:31 AM
or doing some other bcd crap wrong how would i know lol
3:36 AM
e^3 works
3:36 AM
e^4 does not
3:36 AM
lmao
3:40 AM
they read 0xf4eb wtf
3:42 AM
honestly i love how casioemux is like a fork of a fork of a fork of a fork
Avatar
jesus christ how does one build something as bad as casioemux
3:55 AM
oh jesus christ this looks so bad
3:55 AM
i love hidpi
3:58 AM
and its a very efficient program too
3:59 AM
okay so, casioemux the good and the bad
4:02 AM
the good: 1. it does bcd real nice 2. they track a stack trace with a shadow stack similar to how wwce v0.1 worked when it was a coverage guided fuzzer the bad: 1. its incredibly broken when the window size is not what it asks for (because tiling WMs clearly dont exist) 2. it uses 300% cpu and makes the fans spin up 3. the console is ultra blurry 4. the build system is windows only and horrible, i had to backport the pre-fork xmake file 5. it uses lua5.3 not lua5.4 6. it uses lua which is just... no 7. the code is attrocious 8. their key input code doesn't deal with quick typing very well (edited)
4:03 AM
oh yeah i guess the imgui ui is also nice enough
4:03 AM
tho i dont think ill use imgui because pango and cairo arent super complicated
4:08 AM
but doing (e^2)^2 works :^)
Avatar
Avatar
pitust
the good: 1. it does bcd real nice 2. they track a stack trace with a shadow stack similar to how wwce v0.1 worked when it was a coverage guided fuzzer the bad: 1. its incredibly broken when the window size is not what it asks for (because tiling WMs clearly dont exist) 2. it uses 300% cpu and makes the fans spin up 3. the console is ultra blurry 4. the build system is windows only and horrible, i had to backport the pre-fork xmake file 5. it uses lua5.3 not lua5.4 6. it uses lua which is just... no 7. the code is attrocious 8. their key input code doesn't deal with quick typing very well (edited)
*build system is windows only
6:37 AM
also 5 and 6 and 8 have been present in lbphacker's original version already
Avatar
@Steveyboi can you take a trace of doing e^4
Avatar
not now
Avatar
fair enough
Avatar
oh i think i might know what the issue is
3:50 PM
first try
Avatar
the js system is a lot nicer
4:11 PM
because im a lot more confident with js
4:11 PM
and also OOP goes brrr
4:21 PM
might write some text docs (edited)
4:21 PM
not just an impl
4:22 PM
wait nevermind
Avatar
this is the wrap which does all the embedding logic: https://paste.sr.ht/~pitust/7db677e1b691fe6f1d39f40493e864993a3c3236 (edited)
4:45 PM
and i also love how my bcd code is half the size of xyzstk's RE nightmare
Avatar
does sin^-1(cos^-1(tan^-1(tan(cos(sin(9 work tho?
Avatar
oh no idea
5:26 PM
probably not
Avatar
Avatar
Steveyboi
does sin^-1(cos^-1(tan^-1(tan(cos(sin(9 work tho?
lol
Avatar
knew it
5:31 PM
happened to me too
5:32 PM
xyzstk's RE code does calculate that properly tho
5:33 PM
i think its related to why e^4 doesnt work (edited)
5:33 PM
because the way you calculate trig functions is usually with a polynomial
5:36 PM
im either: 1. missing some flag 2. missing some register 3. missing some edge case 4. missing some bcast bits? 5. missing some instruction (unlikely) 6. maybe nop isnt actually a nop? 7. maybe the values are just... wrong? (edited)
Avatar
and also printing all the logs just takes time
Avatar
Avatar
Steveyboi
and also printing all the logs just takes time
yeah i know i know
Avatar
oh incredible e^4 just hangs now?
6:53 PM
I: x add r0, r1 I: x xchg r0, r1 I: x sub r0, r1 I: r BCDERR (repeat) (edited)
6:53 PM
this is the sequence they repeat
6:53 PM
and they test bit 7
6:54 PM
r1, r0 = r0 + r1, r1 r0 = r0 - r1
6:55 PM
im pretty sure this is gcd
6:56 PM
r1 += r0 r0 = -r0 (edited)
6:56 PM
no its like this sequence
6:57 PM
maybe? (edited)
6:58 PM
yeah no i was right
6:58 PM
and i guess the last - borrows?
7:05 PM
okay also i found another wtf
Avatar
@Steveyboi bump number n+1 on e^4 bcd traces
Avatar
Avatar
pitust
@Steveyboi bump number n+1 on e^4 bcd traces
uh do you mean give e^4 bcd traces?
Avatar
well maybe after i sleep, it will take a while for it to calculate with all those log commands tho (edited)
Avatar
i added call stack display, looks quite nice
Avatar
how do you get that?
10:59 PM
i couldnt get a backtrace working reliably
Avatar
super easy
11:00 PM
ins_word = self.read_cmem(self.sim.core.regs.pc, self.sim.core.regs.csr) # BL Cadr if ins_word & 0xf0ff == 0xf001: self.call_trace.insert(0, [self.read_cmem(self.sim.core.regs.pc+2, self.sim.core.regs.csr), (self.sim.core.regs.csr << 16) + (self.sim.core.regs.pc + 4) & 0xfffe]) # BL ERn elif ins_word & 0xff0f == 0xf003: self.call_trace.insert(0, [self.sim.read_reg_er(ins_word >> 4 & 0xf), (self.sim.core.regs.csr << 16) + (self.sim.core.regs.pc + 2) & 0xfffe]) # RT/POP PC elif ins_word == 0xfe1f or ins_word & 0xf2ff == 0xf28e: if len(self.call_trace) > 0: del self.call_trace[0]
Avatar
oh jesus christ
Avatar
thats pretty much the whole code
Avatar
also thats a bit a lot ugly
11:00 PM
and doesnt deal with rop
Avatar
well yes i haven't added ROP support
Avatar
if i were to add ROP support i probably would have to do more work than that (so i won't xd)
Avatar
i wrote a massively broken thing that "should" be able to do that
11:04 PM
but like, lol
11:04 PM
could try again maybe
Avatar
patience time
8:37 PM
calculating e^4 is super slow with all the print commands
Avatar
and even the log buffer is too small for that
8:51 PM
so, here we go again
8:53 PM
and turns out i can just > log.txt
8:54 PM
and no more waiting
8:54 PM
dammit why didnt i think of this earlier
8:56 PM
the entire log in this file, again LoadStore is U8 code, otherwise it is BCD code
13.52 MB
8:57 PM
over 15 MiB wow (edited)
Avatar
holy fuck
8:57 PM
thanks tho
8:58 PM
fucking incredible
8:58 PM
actually wrong formatting ig
Avatar
also diagnostic mode actually uses BCD peripheral (for some reason)
Avatar
DataOperate is BCD right?
9:00 PM
yea
Avatar
yes
9:01 PM
also the buttons are mapped wrong, i assume xyzstk didn't notice it since he uses keyboard
9:01 PM
speaking of that am i like the only person who uses keyboard for casio emulators instead of mouse
Avatar
no i use it for testing
9:04 PM
-- diverged at line 102130 -> mem[f4a9] = 0 (exp 4) -> BCDr0 = 545981500331442390781010 -> BCDr1 = 4000000000000000000000 -> BCDr2 = 400 -> BCDr3 = 598150033144239078100580
9:04 PM
yeppp
9:05 PM
W BCD 0xF4A9 0x04 this occurs on this write they do
9:09 PM
this is 0x29 bytes in
9:09 PM
or r1, index 0x9
9:10 PM
is there an off-by-1 buf in something
9:11 PM
shrc r1, 3 is the last issued insn
9:11 PM
time to build more tests for that one
Avatar
i actually tried doing e^4 in my emu, and...
9:12 PM
didn't expect it to give a result
Avatar
hmm yes
9:13 PM
seems legit
9:13 PM
-> BCDSEL = RUN -> BCDr0 = 0x111122223333444455556666 -> BCDr1 = 0x777788889999aaaabbbbcccc setup: -> BCDCMD = shlc r0, 3 ; 0xcc -> BCDFUCK0 = 0x8 -> BCDr0 = 0x333344445555666600000000 okay i have this new test vector
Avatar
yay logging module prints to stderr and not stdout
Avatar
E: BCD selftest error: expected 0x333344445555666600000000, found 0xccccbbbb1111222233334444: shrc max width practical issue
9:15 PM
this is the value of testing
9:19 PM
problem
9:19 PM
what the actual fuck
9:19 PM
this is a shift RIGHT
9:19 PM
why does it shift left???
9:20 PM
oh is it because my test did shlc by accident
9:21 PM
still wrong
9:21 PM
but now its differently wrong
9:21 PM
fun
9:22 PM
now the test passes
9:22 PM
but the answer is still fucking wrong?
Avatar
(addresses are fx-880BTG / EY-023B emulator ROM) so in the correct code, there should be a write 0x1D to F400H at 1:CAF2H, but in my emulator its a write 0x14 to F400H at 1:CB54H instead
10:37 PM
something's fishy here
Avatar
ok so this is the problem f_1C564: ... .l_0B6: 1:C61AH F101CA8A BL f_1CA8A 1:C61EH C13E BLT .l_138 ... .l_138: 1:C69CH F101CB4E BL f_1CB4E ...
10:45 PM
in the working code the BLT appears to be not taken (edited)
10:46 PM
in my emulator it is taken
10:48 PM
so the BLT checks if carry flag is set
10:49 PM
in my emulator, it is set at 1:C61EH
10:51 PM
clearly there is a difference between these two register displays
10:53 PM
idk if its an emulation thing or the BCD code
10:55 PM
things are becoming more and more fishy
Avatar
WIP debugger (rn it doesnt look like one yet this is me just testing tkinter's grid geometry manager)
Avatar
perfect
Avatar
alright so what are the good practices when making a disassembly view in your debugger
Avatar
shit do i have to pull in imgui or MeMe or something now (edited)
Avatar
Avatar
Steveyboi
alright so what are the good practices when making a disassembly view in your debugger
cool colors are required
Avatar
ok actually how do i fucking make one in tkinter
8:40 PM
with scrollbar
Avatar
have fun lol
Avatar
Idk maybe highlighted instructions, addresses, hexadecimal representation, branch targets(with take/not take information), values of register/memory involved
Avatar
very very beta disassembly view
10:31 PM
the hardest part to code is making the part before the current instruction display correctly
10:31 PM
and its still not 100% correct
Avatar
uglyyy
10:32 PM
also how slow is it
Avatar
haven't checked i only tested in single step
10:37 PM
do you async repaint it when running normally?
10:37 PM
if yes then it doesnt matter that much because its one per 1/60s or something (edited)
10:38 PM
if no then its gonna be maximally slow to unusable
Avatar
Avatar
Steveyboi
very very beta disassembly view
Looks nice
Avatar
maybe make it similar to 9860g sdk with movable closeable windows and a veiw menu to show the different windows
10:54 AM
but idkj how to do that in tkinter
Avatar
and displaying the disassembly before the current instruction is a pain
Avatar
to be effecient is a pain
10:56 AM
rely on users with a fast pc
10:57 AM
fast program counter
Avatar
this is pretty much the code i use # self.disas_hi = 17 instructions = ['']*self.disas_hi middle = self.disas_hi // 2 cur_csr = regs.csr cur_pc = regs.pc format_ins = lambda i, ins_len, inst, offset = 0: f'{">>>" if i == middle else " "} {cur_csr:X}:{cur_pc + offset:04X}H {"".join(format(self.sim.read_cmem((cur_pc + offset + i*2) & 0xfffe, cur_csr), "04X") for i in range(ins_len // 2)):<13} {inst}' # This grabs the disassembly after the current instruction for i in range(middle, self.disas_hi): ins, ins_len = self.sim.decode_instruction(cur_csr, cur_pc) instructions[i] = format_ins(i, ins_len, ins) cur_pc = (cur_pc + ins_len) & 0xfffe i = middle - 1 cur_pc = regs.pc # This grabs the disassembly before the current instruction. Kinda works but very flawed. while i > -1: cur_pc = (cur_pc - 6) & 0xfffe ins, ins_len = self.sim.decode_instruction(cur_csr, cur_pc) if ins_len < 6: ins2, ins_len2 = self.sim.decode_instruction(cur_csr, cur_pc + ins_len) if ins_len2 < 6 - ins_len: ins3, ins_len3 = self.sim.decode_instruction(cur_csr, cur_pc + ins_len + ins_len2) if ins_len3 > 2: ins_len3 = 2 ins3 += '\t; misaligned' instructions[i] = format_ins(i, ins_len3, ins3, ins_len + ins_len2) i -= 1 if i < 0: break instructions[i] = format_ins(i, ins_len2, ins2, ins_len) i -= 1 if i < 0: break instructions[i] = format_ins(i, ins_len, ins) else: instructions[i] = format_ins(i, ins_len2, ins2, ins_len) i -= 1 if i < 0: break instructions[i] = format_ins(i, ins_len, ins) else: instructions[i] = format_ins(i, ins_len, ins) i -= 1
10:58 AM
so how do i fix this code
Avatar
whats the problem?
11:02 AM
oh its all doing directly from the binary, is it the speed thats the problem?
Avatar
no
11:03 AM
look at this
11:03 AM
the "misaligned" shouldnt appear (edited)
11:04 AM
maybe ik why
Avatar
normally bl instruction shouuld be like this x:xxxxH xxxxxxxx
Avatar
no that is handled correctly
11:04 AM
whats not is how its laid out
11:05 AM
the "misaligned" is only supposed to appear right before the current instruction
Avatar
shouold be F001B05EH
Avatar
yes yes yes
Avatar
ok
Avatar
Avatar
Steveyboi
the "misaligned" is only supposed to appear right before the current instruction
oh
Avatar
if i add that check, 0:B006H is not misaligned anymore but it still displays 0:B008H
11:08 AM
shouldn't happen
Avatar
is it because of i = middle - 1?
Avatar
no
11:10 AM
i is the line index
Avatar
do you want to only display to B00AH
Avatar
no
Avatar
could you tell me expected result?
Avatar
expected result should be 0:B004H then 0:B006H then 0:B00AH
11:14 AM
actually i thought of a better algorithm
Avatar
wait a minute... its incrementing in 2 even after the first bl instruction?
Avatar
its not actually incrementing, its decrementing
Avatar
u get what i mean
11:18 AM
there is another issue B012H has only gone up 2 bytes next instruction, are you handling it lime this xxxx|xxxx or like this |xxxxxxxx
Avatar
i handle it by going back 6 bytes at a time, then reading instructions to get proper alignment
11:20 AM
thats a bad idea
Avatar
this is what the debugger looks like now
12:07 PM
you cannot edit the registers yet (you still have to do this via Extra functions > Modify general registers) (edited)
Avatar
Refer to OllyDbg layout maybe
Avatar
nah
Avatar
Avatar
Steveyboi
and displaying the disassembly before the current instruction is a pain
yeah thats a bit ugly
Avatar
happy sheep 3/14/2024 10:46 PM
you can't use the scrpt to unlock emulator on classpad now
10:48 PM
always the ui thing
Avatar
bruh (edited)
10:51 PM
you can still bypass with calculator ID generator
Avatar
happy sheep 3/14/2024 10:52 PM
ofc
Avatar
and they still use v1.1.3.5
Avatar
Avatar
happy sheep
you can't use the scrpt to unlock emulator on classpad now
or maybe i just need to fix the script :^)
👍 1
Avatar
finally got kconfig-frontends mconf working
12:16 PM
also python behaves weirdly on mingw (edited)
12:16 PM
sys.platform is win32
Avatar
Avatar
pitust
or maybe i just need to fix the script :^)
hey pitust i did your debian upgrade and im stuck in infinite login loop i have deleted .Xauthority and nothing
12:18 PM
what do i do?
Avatar
hmm
12:20 PM
i haven't figured out what exactly is it not being able to find (edited)
Avatar
is your shell bash?
Avatar
Avatar
Steveyboi
hmm
Go listen to my music its awful 3/16/2024 1:10 PM
maybe try ./[path]/[path] If the path is not specified
Avatar
Avatar
totalynce
is your shell bash?
it is bash
Avatar
Avatar
Go listen to my music its awful
maybe try ./[path]/[path] If the path is not specified
"i haven't figured out what exactly is it not being able to find"
Avatar
Go listen to my music its awful 3/16/2024 4:58 PM
your path
Avatar
i didnt write that script
4:59 PM
it comes with wwce
Avatar
Avatar
Steveyboi
hmm
alright i know why the third error happens
5:07 PM
space to tab conversion
5:09 PM
and i also have to install vim
5:12 PM
okay what
5:12 PM
it still happens after i install vim so its not a problem with that
5:17 PM
i'm assuming its funky python3 interpreting bash commands as batch commands
5:18 PM
its probably using the windows python
5:18 PM
no wonder sys.platform is win32 (edited)
5:20 PM
and running a command with os.system confirms this
5:27 PM
and i found a workaround
Avatar
oh poof termios.h doesnt exist on mingw
Avatar
Guys, any idea on how to make odd an mode work on user's emulator?
Avatar
round it down to even
Avatar
well, im just curious why odd an mode fails on the emulator (and whether there are ways to fix that)
Avatar
the fork by qiufuyu123 appears to fix it but you will need to provide a disassembly file (edited)
Avatar
i have actually tried that, and it doesn't work
Avatar
100+50an = 160an or 161an
4:50 PM
the emulator has a builtin injector
5:02 PM
so on real hardware there is word alignment for sp? didn't the document say there is not?
Avatar
hmmm...only U16 has SP word alignment
Avatar
time to find where the hi bit buffer is on CWII real ROM
Avatar
Avatar
Steveyboi
time to find where the hi bit buffer is on CWII real ROM
The Administrator 3/23/2024 7:06 PM
its not a separate address
Avatar
Avatar
Steveyboi
time to find where the hi bit buffer is on CWII real ROM
The Administrator 3/23/2024 7:06 PM
An emulator for nX-U8 based Casio calculators. Contribute to Xyzstk/CasioEmuX development by creating an account on GitHub.
Avatar
ah yeah i'm looking at the code now...
Avatar
The Administrator 3/23/2024 7:09 PM
Avatar
so if bit 2 of F037H is set then write to the hi screen buffer, else write to the low one (edited)
7:14 PM
oof
7:15 PM
i'm gonna have to rewrite my screen code
Avatar
done
8:45 PM
finally
8:50 PM
checksum wrong.. hmmmm
8:56 PM
i think i know why
Avatar
YES lobotomy i love colon
Avatar
happy sheep 3/23/2024 9:35 PM
you can try spelling now
Avatar
the emulator is quite slow though...
9:36 PM
like super slow
9:37 PM
CWII at ES PLUS speed
Avatar
Avatar
Steveyboi
checksum wrong.. hmmmm
ok the problem is something else entirely... i wonder what
Avatar
Avatar
Steveyboi
the emulator is quite slow though...
happy sheep 3/23/2024 9:39 PM
maybe the reason is on python
Avatar
hey chatgpt turn this into cpp
Avatar
i love it :)))
10:35 AM
great background lol
Avatar
Master of ROP Translation 3/24/2024 10:55 AM
Woah
10:55 AM
Logo background
10:55 AM
Does this exist in most CWIs?
Avatar
no
10:57 AM
its emulation glitch
10:58 AM
it happens when you don't emulate the shutdown process properly
10:58 AM
the shutdown function in CWII writes the byte sequence 5A 3C to F312H
10:59 AM
after 3C is written F031H is set to 3 (turns off the screen) and execution halts immediately
Avatar
I found something weird: in the emulator, MIE is not considered when accepting interrupts, but after I added checks for that, keyboard ceased to work. (And it's also weird that PSW is actually zero most of the time. Shouldn't MIE be enabled most of the time?
Avatar
the keyboard uses XI0INT interrupt F014H.1, you need to have that bit set when a key is pressed for keyboard to work
11:48 AM
btw, are you xyzstk?
Avatar
No, I think he is not on this discord.
Avatar
Avatar
3818_114
No, I think he is not on this discord.
The Administrator 3/24/2024 11:49 AM
there is an account called Xyzst on this server
Avatar
this account: @Xyzst (edited)
Avatar
The Administrator 3/24/2024 11:49 AM
Avatar
It should be him.
Avatar
sad that he works alone
Avatar
Avatar
Steveyboi
the keyboard uses XI0INT interrupt F014H.1, you need to have that bit set when a key is pressed for keyboard to work
When F014H.1 is set, keyboard will send interrupt requests. And when MIE is enabled, the cpu will accept these interrupts. Is this correct?
Avatar
when you press a key F014H.1 is set and stop mode is disabled, if MIE is set it will jump to the corresponding address in vector table
11:53 AM
i think any interrupt will disable stop mode even when it doesn't actually jump to the vector table address
Avatar
then this is weird: originally in AcceptInterrupt(), there is no checks for MIE, but after I added checks for MIE, the keyboard did not work.
Avatar
maybe a maskable interrupt will only disable stop mode if MIE is not set?
12:01 PM
yes!
12:01 PM
data segment 8 on real CWII is code segment 0
12:02 PM
now that checksum code makes sense
Avatar
Oh, actually casio does not use interrupts (they just RTI for everything)
Avatar
yeah
Avatar
battery on real CWII: uses SFRs F0D0H, F0D1H and F0D2H. to emulate a working battery, check for a write with value 5 to F0D1H. at this time, if F0D0H is 3 and F0D2H is 0, set F0D1H to 6.
Avatar
i really should get back to wwce ngl
Avatar
i am disappointed by the fact that the kids call CasioEmuNeo "CEN" and the xyzstk fork of CasioEmuX "CENX" for CasioEmuNeoX and make it some private closed source thing
Avatar
i just found out CSR on CWII is ANDed with 8
Avatar
seg0 and seg8 seem to be slightly different
8:56 PM
in 0xFC00 to 0xFFFF,which isn't included in the checksum calculation
9:00 PM
the rom window of this region contains some logical codes from 0xFE20,which is included in my rom dump
9:02 PM
the codes seem to be a dead loop but attempt to access them with csr=0 will just result in brk(i tried setting elevel to 2 and it resets)
9:04 PM
for example go to 8:fea0 will result in a shutdown but 0:fea0 just brk
9:06 PM
though all jumps there goes to seg0
9:07 PM
so i assume seg8-f may exist and are just similar to seg0-7
Avatar
advanced off topic hunter 4/5/2024 9:08 PM
get this guy a hacker role
Avatar
yes! exactly
Avatar
advanced off topic hunter 4/5/2024 9:08 PM
because i dont understand a thing
9:10 PM
well maybe a thing or two
Avatar
and the data segments may be just mapped to the same segment of the rom,data seg 8 to rom seg 8,not seg 0 (edited)
9:13 PM
whats more strange is the data from 0x08ffe0 to 0x08ffff seem to be changeable
9:14 PM
i noticed if include the whole seg8 in the checksum calculation then the result may change (edited)
9:17 PM
it seems that a few bits of this region will change from time to time
9:21 PM
im not sure if the data there is mapped to rom window or not and if they are writable or executable
Avatar
if that data is writable and is mapped to code memory, it would mean ACE is technically possible on CWII
Avatar
i once tried writing ff to the first 8 bytes there using the code near the reset entry point,but only a few bits changed from 0 to 1
9:35 PM
though i have to reset the calculator before reading that region using the same code
9:36 PM
im not sure if the changes are due to my writing or not
Avatar
so this is a BCD emulation script i made, initially i hard-REed both the code in SimU8engine.dll and the WASM after discovering your fork i changed things around. and it's still broken (calculations like e^4 don't work)
17.14 KB
9:39 PM
i am still wondering why
Avatar
Avatar
Steveyboi
i just found out CSR on CWII is ANDed with 8
thats SMALL cmodel i think?
Avatar
in SMALL model code segment registers are not used at all (there is only 1 code segment)
Avatar
Avatar
Steveyboi
i just found out CSR on CWII is ANDed with 8
The Administrator 4/6/2024 8:24 AM
if it was anded with 8 it would just be seg 0 and seg 8
8:24 AM
i think you mean ANDed with 7?
Avatar
oh yea, right
Avatar
Avatar
Steveyboi
if that data is writable and is mapped to code memory, it would mean ACE is technically possible on CWII
Yo!
Avatar
Master of ROP Translation 4/6/2024 9:47 AM
Yo good
9:48 AM
I think 999CW can be spelt soon (edited)
Avatar
Avatar
Steveyboi
i just found out CSR on CWII is ANDed with 8
i just did a test about it
12:05 PM
12:06 PM
i made it jump to seg b and called a function which will push lr,then i rendered the lr to screen
12:06 PM
it shows that lcsr is b,not 3
Avatar
alright so nope, but have you actually tested that segment 9 maps to code segment 1, segment A maps to code segment 2 etc?
12:08 PM
tbh that would be excessive
Avatar
it seems to be true
12:09 PM
the same for data segment
Avatar
welp, its probably the nature of the MCU
Avatar
Avatar
Xyzst
the same for data segment
oh
Avatar
Avatar
Steveyboi
so this is a BCD emulation script i made, initially i hard-REed both the code in SimU8engine.dll and the WASM after discovering your fork i changed things around. and it's still broken (calculations like e^4 don't work)
okay what
Avatar
Avatar
Steveyboi
okay what
lmao
Avatar
Avatar
Steveyboi
okay what
L
🤨 1
2:34 AM
100% legal btw
2:37 AM
i wonder what all the other BCDSEL values do tbh
Avatar
@happy sheep could you add a feature to be able to only open hex editor without emu as having both is really laggy for me
Avatar
Master of ROP Translation 4/9/2024 4:07 PM
bruh
4:07 PM
me wasn't lag (edited)
4:08 PM
you should open it in Community Emu
Avatar
happy sheep 4/9/2024 4:12 PM
the official edited mod is deprecated
Avatar
im using community
Avatar
Master of ROP Translation 4/9/2024 4:37 PM
hmm
4:37 PM
for me didn't lag at all
4:37 PM
maybe my ram is higher than your machine
Avatar
i am running on pretty crap pc
kindasus 1
4:38 PM
rn
Avatar
Master of ROP Translation 4/9/2024 4:38 PM
8gb + 4gb virtual
Avatar
4 gb + 12 gb virtual
Avatar
Master of ROP Translation 4/9/2024 4:38 PM
physical ram higher mean performance better
4:38 PM
but still depend on cpu
4:38 PM
me use i5-xxxx
4:39 PM
forgor 💀
Avatar
happy sheep 4/9/2024 5:58 PM
are you using chrome?
Avatar
yeah
Avatar
happy sheep 4/9/2024 6:10 PM
how lag is it🤔
6:10 PM
try minimizing the window you don't want to use
Avatar
its somehow worse
6:19 PM
iether way its fine after all im using an arm device
iosmoai 1
Avatar
how to use strcpy_null?
7:43 PM
like do i do a pop er0 then strcpynull to get data from er0?
Avatar
Avatar
totalynce
how to use strcpy_null?
it just copies a string from [ER2] to [ER0] i think (edited)
Avatar
ok
7:53 PM
pop er2 <address> pop er0 <0xf810> strcpy_null will this hackstring dump seg 0 at er2 to screen?
Avatar
ig, but note that null byte will halt
Avatar
great emulator
Avatar
Master of ROP Translation 4/14/2024 3:49 PM
xyzst give you right?
Avatar
its on github bro
3:49 PM
fully open source
Avatar
Master of ROP Translation 4/14/2024 3:49 PM
but the keypress isn't fit at all
Avatar
just modified the keyboard input code on CasioEmuX (edited)
👍 1
11:23 AM
input on emu rom should be normal now
Avatar
yeah, here's my fix (for fx-880BTG)
Avatar
i mean the lag between two clicks
Avatar
oh
Avatar
made a key injector for CasioEmuX
2:51 PM
it read keycodes from a binary file
Avatar
@Master of ROP Translation plz fix
3:17 AM
(and plz gib delete message perms)
Avatar
Avatar
pitust
@Master of ROP Translation plz fix
lol you pinged wrong guy
7:22 AM
that name literally means "sucking the administrator's D"
3:23 PM
i cant into typing
Avatar
i added a feature where you can middle click on a key to see its KI, KO, box and keysym/char
7:16 PM
meanwhile im rewriting my entire emulator because i dont like like two design choices (edited)
7:18 PM
(seriously, super cool)
Avatar
heres EXE key
7:18 PM
box positions are for CWII interface image
Avatar
maybe i should rewrite the whole thing in rust while im at it
7:28 PM
nah
7:28 PM
it'd basically be a full rewrite and im not that desperate yet
Avatar
okay i hate gui i hate gui i hate gui
Avatar
so the real question is
9:13 PM
do i riir
9:14 PM
or do i not
Avatar
solar indicator on classwiz is controlled by F310H.4, here i modify it on fx-580VN X real ROM emulator to get Solar MODEL OK!
👍 1
Avatar
Avatar
Steveyboi
solar indicator on classwiz is controlled by F310H.4, here i modify it on fx-580VN X real ROM emulator to get Solar MODEL OK!
happy sheep 4/20/2024 9:13 PM
not working on emu rom?
Avatar
emu rom may have erased it? idk
Avatar
Avatar
Steveyboi
solar indicator on classwiz is controlled by F310H.4, here i modify it on fx-580VN X real ROM emulator to get Solar MODEL OK!
bro how u got that memory emulator
Avatar
An emulator for nX-U8 based Casio calculators. Contribute to Xyzstk/CasioEmuX development by creating an account on GitHub.
Avatar
vngithubdev 4/24/2024 1:04 PM
i have snake .bin files
1:04 PM
can it port to 580vnx
Avatar
yes
Avatar
but it might not be very easy
Avatar
join me then
2:36 PM
i have a copy of what casio2009 did so we can wrok of that
Avatar
but why
Avatar
just check addresses
Avatar
seems like a lot of work for not that much gain
Avatar
Avatar
pitust
but why
kids want snake
Avatar
program your own rop
2:36 PM
or make a compiler that makes ropping not a massive pain
Avatar
idk they can do themselves 😃 ill just supply with what casio 2009 did
2:37 PM
and wtf my neighbours cat and my cat are fighting on the roof its so loud\
Avatar
Avatar
totalynce
and wtf my neighbours cat and my cat are fighting on the roof its so loud\
advanced off topic hunter 4/24/2024 2:38 PM
cma, cat martial art
Avatar
my cat only has 3 legs so how
Avatar
Avatar
totalynce
my cat only has 3 legs so how
advanced off topic hunter 4/24/2024 2:39 PM
1 leg attack others in position
2:39 PM
/j
Avatar
Avatar
pitust
program your own rop
im learning alot from xyzst
Avatar
Avatar
totalynce
kids want snake
advanced off topic hunter 4/24/2024 2:39 PM
tetris gooder
2:40 PM
intentional mistake do not point it out
Avatar
i have tetris for 580 vnx
2:40 PM
but its not good to release cuz of ptd
Avatar
Avatar
totalynce
i have tetris for 580 vnx
advanced off topic hunter 4/24/2024 2:41 PM
i still am not proficent at drawing so maybe ill try that out ì i can
2:41 PM
if
Avatar
Avatar
totalynce
but its not good to release cuz of ptd
advanced off topic hunter 4/24/2024 2:41 PM
oh
2:41 PM
yea good idea dont release it
Avatar
if we releawse we have to credit xyzst and casio2009 as he translated it
Avatar
advanced off topic hunter 4/24/2024 2:42 PM
hmm
2:43 PM
i want to try translating sth some day
Avatar
i can teach
Avatar
Avatar
pitust
or make a compiler that makes ropping not a massive pain
vngithubdev 4/26/2024 12:52 AM
using available assembly code in rom from different addresses? (edited)
12:54 AM
why we can't code it freely
Avatar
vngithubdev 4/26/2024 10:16 PM
can i use disas.txt of fx-991cnx for fx-580vnx (casioemuneo)
Avatar
no
10:21 PM
well yes but like
10:22 PM
you will need a real fx-580VN X disas.txt if you're actually wanting to use the disassembler (edited)
Avatar
vngithubdev 4/26/2024 10:22 PM
yep
Avatar
what kind of disas do you need?
10:22 PM
user disas your disas?
Avatar
vngithubdev 4/26/2024 10:23 PM
user
10:23 PM
running fx580vnx
10:23 PM
i replaced rom 991cnx to 580vnx
10:23 PM
keys still works
Avatar
Avatar
vngithubdev
i replaced rom 991cnx to 580vnx
by default it will just load the profile from fx991cnx folder
🇾 1
🇪 1
🇵 1
Avatar
vngithubdev 4/26/2024 10:27 PM
so model.lua still works for this rom so i don't need replace it (edited)
Avatar
Avatar
vngithubdev
so model.lua still works for this rom so i don't need replace it (edited)
*model.lua
Avatar
vngithubdev 4/26/2024 10:28 PM
i corrected
Avatar
you should switch out the model.lua for the one for fx-580VN X
10:28 PM
(it will still work)
Avatar
vngithubdev 4/26/2024 10:29 PM
i will check memory spans
Avatar
most foreigner unfriendly readme
10:30 PM
oh wait
10:30 PM
theres an english readme
Avatar
vngithubdev 4/26/2024 10:38 PM
bruh
10:38 PM
hey
10:39 PM
what if i use that disas.txt for 580vnx
Avatar
it will still work
Avatar
vngithubdev 4/26/2024 10:40 PM
ok
10:40 PM
but it will working wrong
10:40 PM
?
10:47 PM
cursed casio
Avatar
big fat casio
Avatar
Avatar
vngithubdev
cursed casio
o o o o o oi oi oi
🇴 2
🇮 2
Avatar
vngithubdev 4/26/2024 10:59 PM
anyone have disas.txt for real fx580vnx rom?
Avatar
you can generate 1 urself
11:02 PM
also i'm in the process of modifying the scripts so every chinese string left is translatable
Avatar
vngithubdev 4/26/2024 11:02 PM
how 2
11:02 PM
?
Avatar
fork the repository...
11:03 PM
its open source
Avatar
vngithubdev 4/26/2024 11:03 PM
:/
11:04 PM
ik
11:04 PM
but i replace file in the rom folder
Avatar
no like
11:05 PM
in the gui
11:05 PM
there are some untranslated chinese strings
👍 1
Avatar
vngithubdev 4/26/2024 11:07 PM
can i generate disas.txt after disassembled it with iaito
Avatar
no
Avatar
vngithubdev 4/26/2024 11:09 PM
whyyy
11:13 PM
uh
11:13 PM
u said in ur video about ptd that ptd have the disas.txt
Avatar
he does
11:14 PM
but he is so dumd to do anything with it
kekw 1
Avatar
vngithubdev 4/26/2024 11:14 PM
its emulator disas or real rom ?
Avatar
he has alts here so both
Avatar
vngithubdev 4/26/2024 11:16 PM
ok and ...
11:21 PM
its like the disassemble of the rom
11:22 PM
but why i cant generate it from decompiler
Avatar
Avatar
vngithubdev
but why i cant generate it from decompiler
decompiler is a different thing
11:22 PM
you need a disassembler
11:23 PM
specifically user's C++ disassembler (not lua)
Avatar
vngithubdev 4/26/2024 11:24 PM
cpp disassembler
11:24 PM
i haven't heard it before
Avatar
it is included in the CasioEmuNeo repo
Avatar
vngithubdev 4/27/2024 9:47 AM
why this number run from 00 to FF
Avatar
i just generate full _disas.txt for vnx
10:44 AM
10:44 AM
decompress and copy to directory with EmuNeu.exe
10:44 AM
interface.png does not changed
10:45 AM
since similar to cnx
10:46 AM
change lang to english if u want
Avatar
Avatar
vngithubdev
why this number run from 00 to FF
seed for generating random number
Avatar
Avatar
qiufuyu123
Click to see attachment 🖼️
991vnx 🤣
🇧 1
🇷 1
🇺 1
🇭 1
Avatar
vngithubdev 4/27/2024 8:54 PM
anyone have the memory addresses of this drawing program?
Avatar
Avatar
vngithubdev
anyone have the memory addresses of this drawing program?
translate it yourself
9:45 PM
ignore the 00 00, it's a padding for 48 bytes
Avatar
whereas pop should be noticed so that you won't translate wrong shits
Avatar
caught in 4k
9:46 PM
60 fps
👍 1
Avatar
Avatar
᲼᲼
caught in 4k
9:47 PM
trollface
Avatar
i love message logger
Avatar
me too
Avatar
thats why i removed the "no message loggers" rule in my personal server
Avatar
YO GUYS
10:28 PM
user committed to his repo for the first time in 4 years
Avatar
i have made the same changes in my (new) fork
Avatar
Avatar
Steveyboi
YO GUYS
yay hes not dead! yet...
Avatar
introducing...
Avatar
Avatar
Steveyboi
YO GUYS
Shit was a month ago
Avatar
segment 5?
Avatar
data segment 5 on CWI is mapped to code segment 0
Avatar
Avatar
Steveyboi
user committed to his repo for the first time in 4 years
nice
Avatar
Anyone have emu on mobile?
Avatar
Online Calculator Emulator, including models of fx-991CN X, fx-82/350CN X, fx-570/991CW, fx-82/85/350CW, fx-570/991EX, fx-82/85/350EX, fx-570/991AR X, fx-95AR X, fx-82AR X, fx-8200 AU, fx-92B Secondaire, fx-92B Spéciale Collège, fx-991CE X, fx-82/85/350CE X, fx-991DE CW, fx-810DE CW, fx-87DE CW, fx-82/85DE CW, fx-800DE CW, fx-991DE X, fx-87DE X,...
👍 3
Avatar
Avatar
Steveyboi
i love message logger
me too
Avatar
Avatar
a
me too
HSGS
3:36 PM
Avatar
added QR code export
11:35 PM
while the copy display to clipboard uses either win32clipboard or klembord depending on the platform, copy QR URL to clipboard just uses built in tkinter functions (edited)
11:36 PM
also of course QR code export will only be for CWI/CWII emulator ROMs, and well it doesn't work on diag version screen so dont ask (edited)
Avatar
wtf is klembord
Avatar
Avatar
Steveyboi
added QR code export
casio QR app?
Avatar
no
10:45 PM
this is a community made emulator
Avatar
then whats that
10:45 PM
oh
Avatar
Avatar
Steveyboi
this is a community made emulator
is it downloadable?
Avatar
you can
10:46 PM
but you need to compile yourself
Avatar
no pre-compiled?
Avatar
no
Avatar
imma try use it
Avatar
and its pretty slow ngl
Avatar
Avatar
Steveyboi
but you need to compile yourself
this place to compile myself innit?
Avatar
no
10:51 PM
thats a... different emulator (edited)
Avatar
i mean the file to download and compile
Avatar
no
Avatar
then which?
Avatar
that is CasioEmuNeo by qiufuyu123
Avatar
any difference between ur emulator and qiu's emulator?
Avatar
mine was coded in python
10:52 PM
uses a C based U8 core
Avatar
i see
10:53 PM
and does it works on linux tho?
Avatar
i think it will work on linux
Avatar
lemme try linux ig
Avatar
qiufuyu's emulator is an upgraded version of qiufuyu CasioEmuX, which is a fork of a fork of a fork..
Avatar
*extra fork
Avatar
CasioEmuNeo isn't really a fork
10:55 PM
everything was written in C++
10:55 PM
but it also integrates lua
Avatar
@Steveyboi is there way to custom the shutdown screen for the casio rom?
Avatar
requires ROM editing
Avatar
Avatar
Steveyboi
requires ROM editing
i know i need to edit ROM, but i need to edit it under memory editor or something else?
Avatar
memory editor, yes
Avatar
Avatar
Steveyboi
i think it will work on linux
yeet
11:28 AM
nvm ubuntu 18.04 is completely broken
Avatar
Avatar
SystemUI
yeet
i updated the version requirement, redownload the repo or git pull if you cloned the repo
Avatar
Avatar
Steveyboi
i updated the version requirement, redownload the repo or git pull if you cloned the repo
i'll try it later, testing it in OpenSUSE rn
Avatar
Avatar
Steveyboi
i updated the version requirement, redownload the repo or git pull if you cloned the repo
pywin32 not work?
Avatar
huhhhh
11:49 AM
wtf
Avatar
idk man 💀
Avatar
i think you wont need pywin32 for linux?
Avatar
idk
Avatar
pywin32 is for accessing windows APIs
11:50 AM
i removed it from requirements.txt
Avatar
huy@192:~/Desktop/u8-emu-frontend> python3 main.py File "main.py", line 1925 if (url := self.get_qr()) is not None: ^ SyntaxError: invalid syntax
Avatar
whats the output of python3 --version
Avatar
trying to emualte windows????
Avatar
Avatar
Steveyboi
whats the output of python3 --version
huy@192:~/Desktop/u8-emu-frontend> python3 --version Python 3.6.15
Avatar
Avatar
totalynce
trying to emualte windows????
no?
Avatar
Avatar
SystemUI
huy@192:~/Desktop/u8-emu-frontend> python3 --version Python 3.6.15
redownload/pull the repo and you will see the problem (edited)
Avatar
aight
Avatar
Avatar
SystemUI
pywin32 not work?
pywin
Avatar
Avatar
totalynce
pywin
i know sir
Avatar
what is pywin32?
Avatar
for accessing windows APIs
11:55 AM
i don't actually use it in u8-emu-frontend
11:55 AM
but idk how it got into requirements.txt
11:55 AM
ohhhhh
11:55 AM
ik why
11:55 AM
win32clipboard is part of pywin32 (edited)
Avatar
maybe use a different clipboard system or stick to one os
Avatar
i think the problem is in the main.py
11:57 AM
cuz uh
11:57 AM
syntax error
Avatar
Avatar
totalynce
maybe use a different clipboard system or stick to one os
i use win32clipboard for windows, klembord for other systems (edited)
Avatar
Avatar
SystemUI
syntax error
have you redownloaded the repo
Avatar
i did
Avatar
do you use git btw
Avatar
yep
11:59 AM
i just do what the readme.md instruction said btw
Avatar
have you git pulled
Avatar
Avatar
Steveyboi
i use win32clipboard for windows, klembord for other systems (edited)
maybe make a script that detect so it will install the coreect one
Avatar
Avatar
Steveyboi
have you git pulled
requires any argument before pull?
Avatar
no
12:01 PM
just git pull
Avatar
huy@192:~/Documents> git pull https://github.com/gamingwithevets/u8-emu-frontendfatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Avatar
ok so
12:02 PM
you didnt clone it yet?
Avatar
i cloned
Avatar
cd to the clone directory
Avatar
then type git pull
Avatar
i know
12:02 PM
wait so i have to get in the cloned repository and pull it?
Avatar
cd u8-emu-frontend; git pull
Avatar
huy@192:~/u8-emu-frontend> git pull remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (1/1), done. remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0 Unpacking objects: 100% (3/3), 466 bytes | 155.00 KiB/s, done. From https://github.com/gamingwithevets/u8-emu-frontend 25ce646..ac5f95e main -> origin/main Updating 25ce646..ac5f95e Fast-forward main.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) huy@192:~/u8-emu-frontend>
Avatar
now run
Avatar
now python3 main.py and you will see
Avatar
still
12:04 PM
check line 1927
Avatar
ok hang on i'm making an adjustment
Avatar
invalid syntax over there
12:04 PM
alrighty
Avatar
2000+lines goddammit i have never made something that big, stevey is your emu fast or slow because its in python?
Avatar
Avatar
totalynce
2000+lines goddammit i have never made something that big, stevey is your emu fast or slow because its in python?
depends on performance
12:05 PM
idk
12:05 PM
that's how a real developers make more than a thousands line of code
Avatar
u8mcu is 5mhz i think so just get faster cpu steps than taht and slow down accordingly
Avatar
Avatar
totalynce
u8mcu is 5mhz i think so just get faster cpu steps than taht and slow down accordingly
epicly adjusting virtual machine CPU core
Avatar
@SystemUI git pull again
12:11 PM
then run python check_compat.py
Avatar
yo tath is quick stvey
Avatar
Avatar
Steveyboi
@SystemUI git pull again
alr
12:14 PM
yeet.
12:14 PM
imma need to upgrade it
Avatar
yeah
Avatar
3.6.15???!?!??!?!?
Avatar
hol on mate
12:15 PM
i needa look up OpenSUSE forum to check rq
Avatar
try python3.9 check_compat.py
Avatar
i made a seperate compatibility check script just for that
Avatar
maybe installed
Avatar
Avatar
Steveyboi
i made a seperate compatibility check script just for that
since the := operator was added in 3.8
12:16 PM
tbh that was kinda unnecessary
Avatar
lemme install python311 rq
Avatar
so i'm actually gonna remove the check script and replace the operator
Avatar
maybe py3.6 is to run system stuff in OpenSUSE 15.5
12:17 PM
lesgo
12:17 PM
whar
Avatar
it says Please install pygame...
Avatar
i did installed pygame, suspicious...
12:18 PM
lemme try again
Avatar
alright git pull again
12:19 PM
and run python main.py
Avatar
done
12:19 PM
tkinter
Avatar
this is getting weirder and weirder
Avatar
pil
12:19 PM
pip install pillow
12:20 PM
pygame takes pillow
Avatar
Avatar
Steveyboi
this is getting weirder and weirder
nah
12:20 PM
my linux just being empty
12:20 PM
dw
12:21 PM
huy@192:~/u8-emu-frontend> python3.11 main.py [08/05/2024 12:20:34] INFO: Importing config script config.py [08/05/2024 12:20:34] INFO: Config script imported sucessfully [08/05/2024 12:20:34] ERROR: [FileNotFoundError] rom.bin: No such file or directory (2) (full traceback below) [08/05/2024 12:20:34] ERROR: Traceback (most recent call last): [08/05/2024 12:20:34] ERROR: File "/home/huy/u8-emu-frontend/main.py", line 2309, in <module> [08/05/2024 12:20:34] ERROR: sim = Sim(no_clipboard, bcd) [08/05/2024 12:20:34] ERROR: ^^^^^^^^^^^^^^^^^^^^^^ [08/05/2024 12:20:34] ERROR: File "/home/huy/u8-emu-frontend/main.py", line 1229, in __init__ [08/05/2024 12:20:34] ERROR: rom = open(config.rom_file, 'rb').read() [08/05/2024 12:20:34] ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [08/05/2024 12:20:34] ERROR: FileNotFoundError: [Errno 2] No such file or directory: 'rom.bin' huy@192:~/u8-emu-frontend> nvm this is weirder than i expected
Avatar
...
12:21 PM
put the rom file inside
12:21 PM
that IS required
Avatar
i have no rom file 💀
Avatar
ok what calc you want to emulate?
Avatar
580fx-vn-x
Avatar
ok
Avatar
*fx580-vn-x
Avatar
ill dm you with the rom rq
Avatar
thx mate
Avatar
nah 💀
Avatar
blackmail momento? 💀
Avatar
if you want to emulate fx-580VN X, it will need more work
Avatar
Avatar
Steveyboi
if you want to emulate fx-580VN X, it will need more work
why so?
Avatar
wait
Avatar
the pre-included config file was made to support an fx-83GT PLUS emulator ROM
Avatar
yeah
Avatar
yeet
Avatar
thats what i was gonna say
12:23 PM
umm
Avatar
so uh
12:23 PM
now what
Avatar
users emu time!
12:23 PM
but thats the last ditch resort
12:23 PM
try another emu
Avatar
Avatar
SystemUI
now what
whats your screen resolution?
Avatar
Avatar
Steveyboi
whats your screen resolution?
1920x1080
Avatar
okay so i can give you a pre-made config file for fx-580VN X
Avatar
alr
Avatar
but it was made to support 1440p resolution
12:25 PM
the interface graphic is super big so it wont fit on 1080p (edited)
Avatar
Avatar
Steveyboi
but it was made to support 1440p resolution
wait
12:25 PM
it doesnt support resizing windows?
Avatar
nope
12:26 PM
i haven't made that yet..
12:26 PM
anyways here
Avatar
get out a real casio and divide by like 1.30 all the display sizes oh wait you cant do that, no real casio
Avatar
Avatar
Steveyboi
anyways here
thx
Avatar
extract it in the root of the repo
12:27 PM
then run python main.py configs\config_fx580vnx.py
Avatar
Avatar
totalynce
get out a real casio and divide by like 1.30 all the display sizes oh wait you cant do that, no real casio
i accidentally get rid of the tape of the screen 💀
12:28 PM
should i stream the progress?
Avatar
idk man
Avatar
Avatar
Steveyboi
then run python main.py configs\config_fx580vnx.py
@SystemUI have you done it yet
Avatar
im writing the command hol on
Avatar
s l o w
12:29 PM
maybe python3 is a better command
12:30 PM
python3 main.py configs/config_fx580vnx.py
Avatar
im going mental breakdown
Avatar
u should see a doctor
Avatar
huy@192:~/u8-emu-frontend> python3.11 main.py configs\config_fx580vnx.py [08/05/2024 12:30:47] INFO: Importing config script configsconfig_fx580vnx.py Traceback (most recent call last): File "/home/huy/u8-emu-frontend/main.py", line 2287, in <module> spec.loader.exec_module(config) File "<frozen importlib._bootstrap_external>", line 936, in exec_module File "<frozen importlib._bootstrap_external>", line 1073, in get_code File "<frozen importlib._bootstrap_external>", line 1130, in get_data FileNotFoundError: [Errno 2] No such file or directory: '/home/huy/u8-emu-frontend/configsconfig_fx580vnx.py' huy@192:~/u8-emu-frontend>
Avatar
oooh i forgot
12:31 PM
change the backslash to forward slash
12:31 PM
gosh i forgot u were using linux
12:32 PM
there
12:33 PM
12:33 PM
it slows but still usable
Avatar
told ya it was slow
Avatar
i had put the command with the correct slash yet you still follow the genius and not me
12:36 PM
7fps
Avatar
pov: overclocking the calculator
Avatar
how would that even work
Avatar
more power
1:16 PM
on uccf
1:17 PM
they did it
1:17 PM
not really overclock
1:17 PM
just a tad bit faster for aslot more power
Avatar
Avatar
totalynce
more power
i dont think thats how crystal oscillators work?
Avatar
well it calculated faster
1:18 PM
according to their research
Avatar
doubt
Avatar
I don't think CWI has crystal oscillator (edited)
Avatar
Avatar
Steveyboi
told ya it was slow
im thinking about which calculator is the fastest, which one?
Avatar
idk, the graphing calcs ig? (edited)
Avatar
Avatar
SystemUI
im thinking about which calculator is the fastest, which one?
Your pc
Avatar
Avatar
treap
Your pc
watdadogdoin
8:56 AM
hp prime could be fastest actually
8:56 AM
that "your pc" is a joke
Avatar
Avatar
treap
that "your pc" is a joke
(it is actually way faster than any calculator)
Avatar
The Administrator 5/14/2024 9:52 PM
BeuTIMP v0.1
Avatar
i made the window super big
9:54 PM
with big interface
9:54 PM
and 2x pixel size
9:54 PM
perfect 👍
9:55 PM
and this is xyzst CasioEmuX
Avatar
also when will the indicators display correctly without transparency :((( (edited)
Avatar
The Administrator 5/17/2024 11:50 PM
BeuCalc v0.5 build 5
Avatar
the jar file is broken bro
10:52 AM
or maybe my java isnt working
Avatar
did you read the readme
10:53 AM
and did you use the batch files
10:53 AM
double clicking on the jar wont work
Avatar
i use batch files and it is ok
10:54 AM
my java
Avatar
yeah ok
10:54 AM
the jar doesnt really have an entry point
10:54 AM
so you need to specify a classpath (edited)
Avatar
where emu on pc?
1:10 PM
Avatar
Avatar
The Administrator
BeuCalc v0.5 build 5
.
Avatar
Avatar
Hiiamdied
a lot of emus
11:59 PM
eg casioemuneo
Avatar
there we go, much better status bar now (edited)
Avatar
nice!
6:58 PM
stevey you can probably do contrast by when drawing the screen set the pixel brightness to the contrasst sfr
Avatar
multi-color?
7:00 PM
that won't work
Avatar
Avatar
Steveyboi
there we go, much better status bar now (edited)
u8-emu-frontend?
9:19 PM
or is everyone doing casioemuxxyzneoproplus (edited)
Avatar
Avatar
Steveyboi
there we go, much better status bar now (edited)
implement emulation for xyzstk's pwm screen meme
Avatar
Avatar
pitust
u8-emu-frontend?
u8-emu-frontend doesn't have screen shadow
9:36 PM
and you cannot turn off the "displaying LCD/buffer" text
Avatar
i see
Avatar
mean rgb value vs time in 1/60s of a second in display test
9:55 PM
interesting
9:56 PM
the size is one sd, my shitty camera has all the noise possible so its not very readable
9:57 PM
1/10th sd
9:58 PM
unlabelled because why should matplotlib draw labels
10:00 PM
the order is red blue green i think
10:00 PM
39 44 40 is dark (edited)
10:01 PM
54 73 69 is bright?
10:06 PM
maybe not actually i stupid
Avatar
Stevey emu looks like official
Avatar
Avatar
pitust
unlabelled because why should matplotlib draw labels
user202729 6/5/2024 7:30 PM
plt.legend(["red", "green", "blue"]) though the normal order is blue → orange → green
Avatar
Avatar
vngithubdev
running fx580vnx
Link download casio emulator? fx-580VN X (edited)
Avatar
better use the online emulator, son
9:53 PM
Online Calculator Emulator, including models of fx-991CN X, fx-82/350CN X, fx-570/991CW, fx-82/85/350CW, fx-570/991EX, fx-82/85/350EX, fx-570/991AR X, fx-95AR X, fx-82AR X, fx-8200 AU, fx-92B Secondaire, fx-92B Spéciale Collège, fx-991CE X, fx-82/85/350CE X, fx-991DE CW, fx-810DE CW, fx-87DE CW, fx-82/85DE CW, fx-800DE CW, fx-991DE X, fx-87DE X,...
Avatar
Avatar
Steveyboi
better use the online emulator, son
I mean application: fx-580VN X.exe
Avatar
Unable to run file "emulator.exe"
8:18 AM
Avatar
drag a folder onto the exe
8:36 AM
double click will not work
Avatar
vayphailamsao?
Avatar
no vietnamese here!
9:13 PM
(that still counts as vietnamese)
Avatar
okay so
11:21 PM
first of all, hello everybody (edited)
11:21 PM
second of all, i want to write an emulator in Lua for the game Retro Gadgets
11:21 PM
the thing is, whats the simplest or most common calculator i can do it for?
Avatar
Avatar
x_relt_x
second of all, i want to write an emulator in Lua for the game Retro Gadgets
i'm so confused how this relates to casio calculators
Avatar
Avatar
x_relt_x
the thing is, whats the simplest or most common calculator i can do it for?
Hello
12:42 AM
I chose the fx-82/85 es since thats the one i have
Avatar
now im looking for roms
Avatar
what is retro gadgets?
Avatar
i have a rom 018 i believe
Avatar
It is a game that lets u write emulators?
Avatar
Avatar
boxy
It is a game that lets u write emulators?
its a coding sandbox game (edited)
Avatar
Avatar
x_relt_x
I chose the fx-82/85 es since thats the one i have
The Administrator 6/8/2024 12:43 AM
the real ROM 018 has yet to be dumped
Avatar
Avatar
The Administrator
the real ROM 018 has yet to be dumped
so umm
12:43 AM
i have one
12:44 AM
with rom 018
Avatar
btw @The Administrator which calcs do u own
Avatar
The Administrator 6/8/2024 12:44 AM
@x_relt_x i recommend to try emulating the fx-570ES PLUS first instead because the fx-570ES PLUS is more well documented and its rom has been dumped
Avatar
did u know that calc is slang for calculatoer
Avatar
also
12:45 AM
what is mode P?
Avatar
A bunch of test pads that the calculator uses to determine the functionalities
Avatar
Avatar
x_relt_x
what is mode P?
defines the features ES calculator has
8:56 AM
heres a comprehensive list, each P mode corresponds to one or a group of ES models
Avatar
is 82sp GY-450 version E and GY450X version E the same?
Avatar
i dont remember where i found GY-450 VerE
Avatar
hey stevey for making this barebone emulator
3:15 PM
should i make each register a variable?
3:15 PM
or have like an array where parts are mapped to the registers
3:16 PM
can you send the full instruction set with their hex representation?
Avatar
Avatar
totalynce
should i make each register a variable?
yeah
Avatar
Avatar
totalynce
can you send the full instruction set with their hex representation?
core instruction manual
Avatar
damn so long >.<
Avatar
I need to create more fx-570VN PLUS files and add rom
Avatar
whats the code range in the gy454xe rom?
4:50 PM
im writing an emulator and i need to know when it suddenly jumps out of code
4:51 PM
because its doing that and hitting an undefined instruction but i dont know where is the point where it goes nuts
4:51 PM
alos what is the standard flow of code after startup?
4:51 PM
it jumps to 0x12ce
4:51 PM
and that i know is not code, but is there something else?
Avatar
Avatar
x_relt_x
it jumps to 0x12ce
The Administrator 6/11/2024 4:55 PM
112CEh is code
Avatar
it jump to 0x12ce
4:55 PM
4:56 PM
i dont know what i have done wrong
4:56 PM
because i dont exactly know what should happen
Avatar
Avatar
x_relt_x
it jump to 0x12ce
The Administrator 6/11/2024 4:56 PM
it should set CSR to 1 meaning that the cpu should now be reading from 112Ceh
Avatar
oh right
Avatar
Avatar
x_relt_x
oh right
The Administrator 6/11/2024 4:57 PM
did you forget?
Avatar
im pretty sure i did something wrong but i have no idea what
Avatar
what does the startup loop even do?
Avatar
Avatar
x_relt_x
what does the startup loop even do?
Where's Ur code?
Avatar
Have u written code for this emulator
Avatar
yes
Avatar
Is it a lot of code or nah?
Avatar
i used enderfire's emulator as reference
8:20 PM
and wrote it in lua
8:20 PM
dawg
8:20 PM
why are you asking
8:21 PM
Avatar
Just to figure out what's wrong
8:21 PM
It's hard from just an image
Avatar
here
Avatar
One thing you can do is dump to a file all the instructions ran and compare it to another emulator
Avatar
i cant dump to file
8:22 PM
it gets stuck in the startup loop
Avatar
Avatar
x_relt_x
i cant dump to file
Is this because it gets stuck in the startup loop or because the game doesn't allow it?
Avatar
the game doesnt allow it
Avatar
I can try running the code outside of the game if I can figure that out
Avatar
its luau
8:24 PM
not pure lua
8:24 PM
ROM.lua based
Avatar
rom.lua
789.38 KB
Avatar
i figured it out
8:41 PM
DSR was broken again
Avatar
Avatar
x_relt_x
DSR was broken again
Does it work now?
8:56 PM
That would be so epic
8:56 PM
The code is a lot shorter than mine but idk if the chip used is a different one or smth
Avatar
Avatar
boxy
Does it work now?
not yet
9:03 PM
still have to implement some stuff
9:03 PM
The code did seem fairly short but perhaps this approach is shorter (edited)
9:03 PM
Lol that typo
Avatar
no crashes but also no blinking cursor
10:08 PM
hm
Avatar
Avatar
x_relt_x
no crashes but also no blinking cursor
I think you need to enable interrupts to get a blinking cursor
Avatar
Not enable them but program them in (edited)
Avatar
yeah i know
10:17 PM
im gonna look into that
Avatar
Avatar
x_relt_x
im gonna look into that
You only need to implement a very small subset of the interrupts because except for the timer and keyboard interrupt, no other interrupts get used as far as my knowledge goes
Avatar
i need help with debugging the character print function
5:50 PM
0:2EBAh
5:50 PM
it tries to write to 00d7 and up because EA is d7
5:50 PM
i dont think this is the intended behavior
5:51 PM
so i need help
Avatar
okay
8:23 PM
i fixed it
8:23 PM
how do i implement keyboard properly?
Avatar
here is the keyboard table
8:56 PM
delta/frsr made a pretty good writeup of how to implement keyboard here: https://canary.discord.com/channels/839749858687844372/839749858687844376/1146063120033394761
Avatar
alright then i have something wrong with my emu
Avatar
@Steveyboi whats the subroutine for pressing a button, like if i press a 1 what function gets called
Avatar
i dont think that presing a button runs a function but there is a function called getkeycode which will store whatever key is pressed next into the er0 register
Avatar
im using the gy454xe btw
Avatar
yeah
Avatar
Avatar
totalynce
i dont think that presing a button runs a function but there is a function called getkeycode which will store whatever key is pressed next into the er0 register
where is it?
Avatar
if you have user202729's disasembly there are labels on some of the functions
4:50 AM
ill find it rq
4:50 AM
github.com/user202729/fxesplus
4:51 AM
0B0C6 getscancode # void (keyinfo* er0) # where keyinfo = struct { char ki; char ko; } 0B370 charprintreal_screen # char(er0) -> real screen at (er2) 0B45E getkeycode # handle modifier keys # (for example shift+1 has different keycode from 1)
4:51 AM
getkeycode and getscancode
4:52 AM
scancode gives the ki/ko of the key pressed
4:52 AM
getkeycode is different as it allows different codes for shift + key alpha + key rcl and sto
Avatar
i wired the 0 button to the 1 keycode and this is what happens
4:06 PM
i have no idea why this is happening
4:06 PM
emulator is running fine
Avatar
have you hard coded the sfr keycode region?
4:07 PM
whats the sfr keycode region
Avatar
the keycodes are stored in an addres in ram but the functions just process those
Avatar
yeah
Avatar
umm what calc are you eulating?
4:07 PM
991esp right?
Avatar
gy454xe (edited)
Avatar
same thing
4:08 PM
ill get it rq
Avatar
Avatar
Steveyboi
here is the keyboard table
this is it actually
4:08 PM
you see the 0xf06.0 etc and f040.4 etc
4:08 PM
thats where the keycodes are stored
Avatar
this is my code for the reading
Avatar
i think you may have to map them to those bits
Avatar
im mapping them
Avatar
Avatar
totalynce
i think you may have to map them to those bits
i did that
Avatar
then idk why it doesnt work sorry
4:10 PM
but the emulator looks nice
Avatar
what function does it call
4:11 PM
when i press 1
4:11 PM
like, after it has processed that a 1 has been pressed
Avatar
should call getkeycode
Avatar
where does it jump to
Avatar
it probably should jump to render to update the screen
Avatar
Avatar
Steveyboi
should call getkeycode
doesnt getkeycode automaticly run and waits until a key has been pressed?
Avatar
getkeycode puts the 1 in the equation buffer?
Avatar
yeah
4:12 PM
the screen buffer
Avatar
Avatar
totalynce
doesnt getkeycode automaticly run and waits until a key has been pressed?
i forgor
4:12 PM
but yes that is the case
4:13 PM
where is getkeycode?
Avatar
0b45e iirc
Avatar
this is the disas with labels
Avatar
hell no he dont need that shit
Avatar
you can search "getkeycode" and where its run etc
Avatar
Avatar
Steveyboi
0b45e iirc
yeah i checked its this one
4:14 PM
0B0C6 getscancode # void (keyinfo* er0) # where keyinfo = struct { char ki; char ko; } 0B45E getkeycode # handle modifier keys # (for example shift+1 has different keycode from 1) (edited)
Avatar
so what else could i try
4:15 PM
maybe the mode button
Avatar
sure why not
Avatar
same thing happens
4:17 PM
Avatar
oop
4:17 PM
so it doesnt handle it even
Avatar
do you have a memory veiwer of some sort
Avatar
yeah
4:18 PM
where should i look
Avatar
f040 and f036
4:18 PM
see if they change
4:18 PM
when pressing keys
Avatar
Avatar
totalynce
f040 and f036
*f046
Avatar
im manually setting f040
4:19 PM
4:19 PM
printing 0xf046
Avatar
weird
Avatar
i probably implemented some instruction wrong
4:21 PM
but idk which one
Avatar
check return value of getscancode
4:22 PM
if everything goes well, [ER0] should hold the KI and KO value of the pressed key
Avatar
where does getscancode return (edited)
Avatar
well actually it uses an out ptr...
Avatar
nvm
4:22 PM
i found it (edited)
4:23 PM
Avatar
hmm, lemme get an emulator working
Avatar
okay looks like user202729 was wrong
4:34 PM
lets see if i can compile CasioEmuX on linux
Avatar
okay so
4:34 PM
can you just tell me what you need
4:34 PM
i have beucalc compiled
4:34 PM
what do you need to check
4:35 PM
where to break where to jump, where to check (edited)
Avatar
ok i found it
4:36 PM
80F2H
Avatar
what is it
Avatar
that should store the KI and KO values of the last key pressed
Avatar
bam, thats your problem
4:38 PM
F8CE is an opcode for PUSH LR
4:38 PM
obviously that shouldn't be there
Avatar
This is why you dont write emulators in lua
4:42 PM
Avatar
well there we go
Avatar
i had to
4:42 PM
do
4:42 PM
And(addr+offs,0xffff)
Avatar
new issue
5:49 PM
when i press equals nothing appears
Avatar
no result, i see
5:53 PM
probably some instruction is wrong
Avatar
yeah
Avatar
Avatar
Steveyboi
probably some instruction is wrong
where is the function that displays the result (edited)
Avatar
num_output_print
Avatar
bruh i was gonna say that
Avatar
02C04 num_output_print # takes num*, if == NULL then print '' (edited)
Avatar
yeah it doesnt jump to it
Avatar
oh boy
Avatar
maybe try implement a stack trace to see where it breaks
Avatar
it doesnt break
6:13 PM
like
6:13 PM
it just straight up doesnt display a result
Avatar
wait
Avatar
and just goes back to normal when you press a button
Avatar
try going to lineio
6:14 PM
in lineio, num_output_print is always called
Avatar
oh yeah most people when they make their emu it breaks on mathio printing as it uses alot of wierd functions
Avatar
also, got CasioEmuX compiled on linux
Avatar
im in lineio
6:16 PM
Avatar
ooh thats not good
6:17 PM
heres what it should look like
Avatar
yeah
6:19 PM
but it does get called
6:19 PM
num_output_print
Avatar
whats the value of ER0?
Avatar
Avatar
Steveyboi
whats the value of ER0?
Avatar
that looks good
6:22 PM
grab the value of [ER0]
Avatar
that means its something with num_output_print...
Avatar
line_print
6:25 PM
does it take stuff from er0
Avatar
R0 is column, R1 is row, [ER2] is the string
6:26 PM
it also calls char_print with R0=col, R1=row, R2=char
Avatar
r0 is row
6:28 PM
r1 is column
Avatar
i think its the other way around
Avatar
idk
6:30 PM
oh yea you right
6:31 PM
it gets called
6:31 PM
with 0
6:31 PM
in [er2]
Avatar
line_print?
Avatar
yeah
Avatar
thats weird
Avatar
nvm
6:37 PM
it calls it with
6:37 PM
r0: 5a
6:37 PM
r1: 16
6:37 PM
and [r2]: 0x30
6:40 PM
char_print gets called with the same
Avatar
does mode menu display anything?
Avatar
yeah
6:42 PM
Avatar
hmm that means line printing functions are working correctly...
Avatar
no i dont think they are
6:52 PM
nvm wtf
Avatar
okay so
7:06 PM
it renders to the buffer succesfully
7:11 PM
oh so the buffer gets cleared
7:11 PM
for some reason
7:16 PM
so it gets memzeroed
7:20 PM
7c8a
7:20 PM
it calls buffer_clear_lastnline
7:20 PM
and that clears the buffer
7:21 PM
meaning it wont show the output
Avatar
check value of R0 when that function is called?
Avatar
it is c
Avatar
and it ends up clearing the entire buffer?
7:23 PM
wait no
Avatar
it clears the bottom line
Avatar
of course not
Avatar
Avatar
x_relt_x
it clears the bottom line
ok yeah thats intended
7:24 PM
wait, where is buffer_clear_lastnline called
Avatar
Avatar
x_relt_x
7c8a
.
Avatar
oh ok
7:28 PM
wait
7:28 PM
is num_output_print called from f_07B60?
Avatar
yeah
7:28 PM
njvm
7:28 PM
no
7:28 PM
it is not called
Avatar
try checking value of R5 at 0:7BACH?
Avatar
it is 0
7:31 PM
im already past that
7:32 PM
im looking at f_087BA (edited)
Avatar
alright
Avatar
so it fails at 087CE
7:35 PM
it doesnt pass the check
7:35 PM
because mode is c1 (edited)
Avatar
C1 is COMP mode, that is set correctly
Avatar
okay the issue is somewhere else
7:41 PM
okay so
7:41 PM
0x2c04 doesnt get called
7:41 PM
at all
7:41 PM
in lineio
7:41 PM
num_output_print
7:41 PM
@Steveyboi
Avatar
it should get called at 0:B9BEH (edited)
Avatar
yeah
7:42 PM
but thats only that
7:42 PM
doesnt get called when you press =
7:44 PM
what gets called to display the result
Avatar
time to call trace line print and find out
Avatar
hoo boy
Avatar
traced it back to 0:6B12H
7:53 PM
called from a function table
7:53 PM
though the breakpoint hits on every char print
Avatar
0x7e38
7:56 PM
8d74 is 0
Avatar
strcpy_null
Avatar
i fixed it
Avatar
trig functions return a syntax error
8:31 PM
oof
8:34 PM
something isnt right
8:35 PM
@Steveyboi
Avatar
Avatar
Steveyboi
also, got CasioEmuX compiled on linux
advanced off topic hunter 6/13/2024 8:42 PM
oh damn how
Avatar
Avatar
x_relt_x
something isnt right
very broken...
Avatar
advanced off topic hunter 6/13/2024 8:43 PM
ohhh what emulator is that
Avatar
Avatar
advanced off topic hunter
ohhh what emulator is that
uhhhh
Avatar
its a coding sandbox game
Avatar
advanced off topic hunter 6/13/2024 8:43 PM
oh
Avatar
named retro gadgets
Avatar
advanced off topic hunter 6/13/2024 8:43 PM
cool
Avatar
Avatar
x_relt_x
Click to see attachment 🖼️
looking at the time i can see your timezone is UTC+2
Avatar
yeah poland (edited)
Avatar
the memes ...
Avatar
@The Administrator
Avatar
the upside down exclamation mark is char 01 btw
Avatar
now im starting to wonder
9:20 PM
should it do this
Avatar
@Steveyboi
9:33 PM
where even is the cursor blinking code
Avatar
Avatar
x_relt_x
now im starting to wonder
that may be because of the game itself?
Avatar
Avatar
Steveyboi
that may be because of the game itself?
no
9:50 PM
it keeps calling the blinking code
9:50 PM
like, keeps
Avatar
there is one thing though, its supposed to draw from top to bottom
Avatar
no no
9:51 PM
its drawing
9:52 PM
very quickly
9:52 PM
its drawing multiple times per frame
9:52 PM
its blinking multiple times per frame
Avatar
oh yeah right
9:52 PM
you haven't implemented the timer
9:52 PM
and stop code acceptor
9:52 PM
and stop mode
Avatar
whats stop code?
9:54 PM
when should it stop
Avatar
Avatar
x_relt_x
whats stop code?
the delay function writes 0x50 and 0xA0 to F008H, then writes 0x02 to F009H these 3 things must happen in order for stop mode to be enabled
Avatar
oh ok
Avatar
Avatar
x_relt_x
when should it stop
the counter at F022H will count up and when it reaches the value of the word at F020H then exit stop mode and set F014H to 0x20 (edited)
9:57 PM
when a key is pressed, it will also exit stop mode but sets F014H to 2
Avatar
yeah now its much better
10:07 PM
@Steveyboi
10:07 PM
Hm
Avatar
Avatar
x_relt_x
@Steveyboi
woah
10:07 PM
it is printing the ROM window
10:08 PM
the start of it
Avatar
hah
10:09 PM
Avatar
ah yes, very reliable calculator
Avatar
so how do we go about debugging this
Avatar
idk really
Avatar
ill just
10:10 PM
nvm
10:10 PM
ok so
10:10 PM
when an equation gets processed and the result is made
10:10 PM
is it just printed directly
10:10 PM
or stored to a buffer and then printed later
Avatar
the result is stored in some of the addresses near start of RAM (80xxH)
10:11 PM
it is converted to text and printed onscreen
Avatar
whats 52d0
Avatar
in font?
Avatar
no like
11:18 PM
the function
Avatar
unnamed
Avatar
good news
12:39 AM
((2 doesnt crash anymore
12:39 AM
instead it does this
Avatar
cool, i might download a crack retro gadgets later
Avatar
CasioEmuX with linux support: https://github.com/fxesdev/CasioEmuX
An emulator for nX-U8/100 and nX-U16/100 based Casio calculators - fxesdev/CasioEmuX
Avatar
(i dont have any money) (edited)
11:18 AM
unity...????why is it always unity?????
11:19 AM
oh nvm, this is a smart thing to do, +696969 social credit to the devs
11:23 AM
well no fuck it
Avatar
so this result
1:37 PM
in memory, its...
1:37 PM
thats obviously wrong
1:39 PM
using a QR code we can see the truth...
1:39 PM
switching to decimal
1:43 PM
typing that result directly works, but...
1:43 PM
yeah seems legit, this is graph light simulator (no format) (edited)
Avatar
Avatar
Steveyboi
cool, i might download a crack retro gadgets later
i can give you the rgadget file
Avatar
sure
Avatar
Avatar
Steveyboi
sure
3:02 PM
put in Documents\My Games\Retro\Gadgets
Avatar
yeah ik
Avatar
fuck nvm
3:08 PM
i was testing my emu
3:09 PM
use this one instead
3:10 PM
@Steveyboi
Avatar
for some reason, its not showing up in the archive?
Avatar
restart the game
Avatar
i did that like several times already
3:12 PM
do you have an emulated workshop folder
Avatar
ohhh... no
Avatar
then idk
3:12 PM
it should be in your gadgets
3:12 PM
the one you made
Avatar
Avatar
Steveyboi
ohhh... no
stevey install virus instead of crack version of game?
Avatar
should be in here @Steveyboi
Avatar
nothing here
Avatar
can you press this
3:14 PM
in the main menu
Avatar
well, heres my gadgets directory
3:14 PM
i literally moved everything else out
3:14 PM
just left this
Avatar
what version you on?
Avatar
0.1.9
3:15 PM
yaeh the latest one is 0.1.9.1
Avatar
-_-
3:15 PM
fuck
Avatar
i can give you it
3:15 PM
but 🤫
Avatar
sure why not
Avatar
does it work
3:18 PM
hold on
3:18 PM
i got an idea
3:18 PM
@Steveyboi
Avatar
Avatar
Steveyboi
unity...????why is it always unity?????
go to your retro gadgets folder in here
3:19 PM
go to RetroLauncher
Avatar
ok
Avatar
and open the rgadget with retrolauncher
3:19 PM
in cmd
3:19 PM
nvm it doesnt work wtf
3:21 PM
oh i know why
3:21 PM
wait
Avatar
Avatar
x_relt_x
does it work
yeah no doesnt work
Avatar
oh nvm it does
3:22 PM
its in the tray
3:22 PM
if you
3:22 PM
open retro launcher
3:23 PM
3:23 PM
oh
3:23 PM
i know what to do
3:23 PM
do this
3:24 PM
hm
Avatar
retro launcher doesnt seem to do anything
Avatar
it funny because you gotta put it in the temp directory (edited)
Avatar
temp directory??
Avatar
idk what to do now
4:45 PM
The Emulator Works
4:45 PM
IDK WHAT TO DO
Avatar
implement emulator keyboard and get fx-82ES working
Avatar
now to port it to roblox because its lua
Avatar
Avatar
Steveyboi
implement emulator keyboard and get fx-82ES working
i want the real thing
5:05 PM
i probably should dump the fx-85es rom that i have (edited)
Avatar
:/
5:06 PM
thats the thing
5:06 PM
its hard to do good rop on es models
Avatar
im crazy
5:06 PM
ill do it
5:06 PM
tell me everything you know
Avatar
you should just use the emulato but i will se if i can find a link about a similar topic with stevey and beubeu
Avatar
Avatar
x_relt_x
i probably should dump the fx-85es rom that i have (edited)
wait check do you have a verB or verA
Avatar
Avatar
Steveyboi
wait check do you have a verB or verA
how do i do that
Avatar
post a pic of PCB
Avatar
hey hats what i was gonna say 😠
Avatar
@Steveyboi @totalynce
Avatar
wait can you show a photo of the back of the calc itslef? where the like made in china would be
Avatar
Avatar
x_relt_x
@Steveyboi @totalynce
you have a verA
Avatar
Avatar
Steveyboi
you have a verA
is that good or bad
Avatar
good
5:23 PM
because you can upgrade it to fx-570/991ES
Avatar
i did that
Avatar
oh cool
5:23 PM
nice
Avatar
so now
5:32 PM
@totalynce @Steveyboi about rop
5:33 PM
what has been found about in the rom 018
Avatar
Avatar
x_relt_x
what has been found about in the rom 018
pinned message in #general-fx-es
Avatar
Avatar
Steveyboi
CasioEmuX with linux support: https://github.com/fxesdev/CasioEmuX
advanced off topic hunter 6/14/2024 5:37 PM
aint no way
5:37 PM
my man did the impossible
Avatar
its ez bro
5:39 PM
though i haven't retested the windows build script
Avatar
advanced off topic hunter 6/14/2024 5:39 PM
manipulating other's people works on github part 101
Avatar
rom018_emu
5:55 PM
where does it read keyboard
5:55 PM
like
5:55 PM
what address
Avatar
8E01H for KI, 8E02H for KO
5:58 PM
for emu keyboard however, you write to both KI and KO
5:58 PM
and KI is not inverted here
6:00 PM
you also need to check 8E00H when stop mode is enabled, if it is 0, ignore it, if it is 2, ignore it ONLY if [AC] is pressed, or else write 0 to it
Avatar
i dont even think i need to do that
6:03 PM
it runs better than the original one
6:03 PM
def
Avatar
if you don't do the last part, you will get AC Break on some calculations
Avatar
what calculations
Avatar
i think things involving calc
Avatar
tbh i never knew what calc did
6:04 PM
i always used the base fx-85es
Avatar
actually check the crc32 of the rom you have
6:06 PM
there are actually 2 emulator ROMs of ROM 018 available
Avatar
im using the one from beucalc
Avatar
beucalc, i see, beubeu helped ya lots
6:08 PM
yeah the 1/1r glitch is working as intended
6:08 PM
good to know
Avatar
that rom is actually pretty similar to real ROM
6:08 PM
actually
Avatar
thats good to know
Avatar
which are are you using
Avatar
emu
Avatar
hmm yeah then you'll have to do the AC thing
6:10 PM
the sample emulator ROM is closer to the real ROM
6:10 PM
ok
6:10 PM
why is that
Avatar
idk, casio just havent implemented the emulator AC break fully yet
6:10 PM
in that rom
6:11 PM
and so it has the real ROM AC break implementation
6:11 PM
but no-oped out
Avatar
i see
Avatar
actually its more like, it does return before the actual code
Avatar
and my theory is that emu roms are just left over developemnt roms that they use and the finished "clean" ones are only in the real deal, ofc they have the "real deal" emu but they wont give it to us
Avatar
hell no
6:12 PM
idk about the internal real ROM emulators
Avatar
i mean if they have an emulator similar to us for debbugin the calc where you throw in rom and click run ig they have the ability to
Avatar
Avatar
Steveyboi
idk about the internal real ROM emulators
but i think casio made a seperate keyboard system for their emulators so they could do ... things with it
6:13 PM
like not having to auto detect the QR code (on classwiz)
Avatar
okay so
6:14 PM
when i do the 1/1r thing
6:14 PM
what exactly happens
6:14 PM
anybody knows?
Avatar
stack is trashed
Avatar
ill make a stack view
Avatar
left: normal stack (before 1/1 r) right: trashed stack (after 1/1 r)
Avatar
@Steveyboi wanna vc?
Avatar
Avatar
x_relt_x
@Steveyboi wanna vc?
that doesn't exist here...
Avatar
in dms
6:18 PM
ill screenshare
Avatar
alright
Avatar
Can someone implement f039 sfr on their emu??
Avatar
Avatar
totalynce
Can someone implement f039 sfr on their emu??
Do you have Retro Gadgets
Avatar
No sorry
Avatar
Avatar
totalynce
Can someone implement f039 sfr on their emu??
telecomadm1145 6/15/2024 9:22 AM
this one?
9:22 AM
simple
Avatar
telecomadm1145 6/15/2024 9:35 AM
9:35 AM
@totalynce
Avatar
yay
Avatar
telecomadm1145 6/15/2024 9:36 AM
can you see if this is the same as real hw
Avatar
thats the thing :/ i dont have real hardware
Avatar
telecomadm1145 6/15/2024 9:36 AM
huh
9:36 AM
@Master of ROP Translation see if this is wrong
Avatar
but increasing f039 by one moves the screen up
9:36 AM
default is 00
Avatar
Avatar
totalynce
but increasing f039 by one moves the screen up
telecomadm1145 6/15/2024 9:36 AM
that should be correct
9:37 AM
tho i didnt emulate the status bar correctly
Avatar
Avatar
telecomadm1145
tho i didnt emulate the status bar correctly
telecomadm1145 6/15/2024 9:37 AM
but ig its fine tho
9:43 AM
ok
9:44 AM
Avatar
now the last part before i think emu is complete
9:44 AM
screen fading
Avatar
telecomadm1145 6/15/2024 9:45 AM
texture blending ig?
Avatar
ig so
9:45 AM
just blending the frames
Avatar
Master of ROP Translation 6/15/2024 9:51 AM
oh
9:51 AM
telecom implement F039?
9:52 AM
cool
Avatar
try inject the smooth anbd double scroll text
Avatar
Master of ROP Translation 6/15/2024 9:52 AM
but where's the emu?
9:52 AM
:)
9:53 AM
xyzst emu doesn't implement the effect of F039
Avatar
@telecomadm1145 can you run 580vnx and run @Master of ROP Translation hex of scrolling text and double scrolling text?
Avatar
Avatar
Master of ROP Translation
but where's the emu?
telecomadm1145 6/15/2024 9:56 AM
wait
9:56 AM
until i compiled the code
Avatar
Avatar
totalynce
@telecomadm1145 can you run 580vnx and run @Master of ROP Translation hex of scrolling text and double scrolling text?
Master of ROP Translation 6/15/2024 9:57 AM
good idea
9:57 AM
remember to record it :)
Avatar
telecomadm1145 6/15/2024 10:00 AM
10:00 AM
there
10:00 AM
@Master of ROP Translation
Avatar
Master of ROP Translation 6/15/2024 10:00 AM
good job thanks a lot
Avatar
telecomadm1145 6/15/2024 10:01 AM
ping me if any bug occurred
Avatar
apparently its a vidus
10:01 AM
virus
Avatar
telecomadm1145 6/15/2024 10:02 AM
did windows defender complain about my program?
Avatar
uhh
Avatar
Avatar
telecomadm1145
did windows defender complain about my program?
Master of ROP Translation 6/15/2024 10:02 AM
no
Avatar
Avatar
totalynce
apparently its a vidus
telecomadm1145 6/15/2024 10:03 AM
if you dont trust me,compile it urself
Avatar
i do trust you i dont think that thats part of your code
Avatar
telecomadm1145 6/15/2024 10:03 AM
ill push it to my github repo
Avatar
ok
Avatar
Master of ROP Translation 6/15/2024 10:03 AM
yay
10:03 AM
first time playing with this emu
Avatar
ok how to i install on windows?
Avatar
telecomadm1145 6/15/2024 10:04 AM
its a portable program
Avatar
Master of ROP Translation 6/15/2024 10:04 AM
@telecomadm1145 is it support copy paste hex?
Avatar
Avatar
Master of ROP Translation
@telecomadm1145 is it support copy paste hex?
telecomadm1145 6/15/2024 10:05 AM
no on cwx unfortunately
10:05 AM
btw which format is ur hex
10:05 AM
aa bb cc dd like this?
Avatar
Master of ROP Translation 6/15/2024 10:05 AM
yes
Avatar
telecomadm1145 6/15/2024 10:06 AM
then i can make a simple ui to inject that
Avatar
can you send 580vnx rom?
Avatar
telecomadm1145 6/15/2024 10:09 AM
181.05 KB
Avatar
Master of ROP Translation 6/15/2024 10:10 AM
I have full rom
10:10 AM
:)
10:10 AM
also this emu is cool
10:10 AM
i can use lua-common.lua with your emu (edited)
Avatar
yay i got it
10:12 AM
@Master of ROP Translation can you send hex of launcher and scroll spell and where to inject them?
Avatar
Master of ROP Translation 6/15/2024 10:12 AM
okay
10:12 AM

Scrolling vertically 0xE9E0

34 7b 31 30 01 30 5c ea c8 3d 32 30 7e 94 30 30 34 7b 31 30 11 30 6d ea c8 3d 32 30 7e 94 30 30 34 7b 31 30 21 30 7e ea c8 3d 32 30 7e 94 30 30 34 7b 31 30 31 30 8f ea c8 3d 32 30 7e 94 30 30 74 89 31 30 00 00 02 26 31 30 39 f0 a6 a8 30 30 39 f0 a8 9f 30 30 d8 39 31 30 74 89 31 30 01 00 a0 9c 30 30 30 30 39 f0 02 26 31 30 01 05 3c 9f 30 30 78 5c 31 30 2a ea 83 3f 32 30 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
10:13 AM

Scroll both up and down 0xE9E0

34 7b 31 30 01 30 f4 ea c8 3d 32 30 7e 94 30 30 34 7b 31 30 11 30 05 eb c8 3d 32 30 7e 94 30 30 34 7b 31 30 21 30 16 eb c8 3d 32 30 7e 94 30 30 34 7b 31 30 31 30 27 eb c8 3d 32 30 7e 94 30 30 74 89 31 30 00 00 02 26 31 30 38 f0 a6 a8 30 30 38 f0 a8 9f 30 30 d8 39 31 30 74 89 31 30 00 01 02 26 31 30 50 01 3c 9f 30 30 74 89 31 30 38 f0 9e 3b 31 30 a8 9f 30 30 70 ea 30 30 30 30 a8 9f 30 30 8a 9e 30 30 a8 9f 30 30 8a 9e 30 30 a6 50 32 30 38 f0 a8 9f 30 30 30 33 31 30 50 01 3c 9f 30 30 74 89 31 30 00 01 a0 9c 30 30 30 30 38 f0 02 26 31 30 50 01 3c 9f 30 30 a8 9f 30 30 74 89 31 30 38 f0 9e 3b 31 30 a8 9f 30 30 70 ea 30 30 30 30 a8 9f 30 30 8a 9e 30 30 a8 9f 30 30 8a 9e 30 30 74 89 31 30 00 01 a8 9f 30 30 8a 9e 30 30 a6 50 32 30 38 f0 a8 9f 30 30 30 33 31 30 01 01 02 26 31 30 50 01 3c 9f 30 30 78 5c 31 30 30 ea 83 3f 32 30 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
(edited)
10:13 AM

Launcher 0xD180:

<34 bytes> 78 5c 31 30 de e9 60 0d 32 48
10:13 AM
same launcher!
Avatar
is there a way to make into inja={}?
10:14 AM
or how do you inject rop on here
Avatar
Master of ROP Translation 6/15/2024 10:14 AM
wait a few min (edited)
10:14 AM
i will make the inj script
10:15 AM
Normally I use CasioEmuNeo to paste these raw hex there
10:22 AM
10:22 AM
@totalynce what da heck
Avatar
?????
10:22 AM
maybe you inj wrong
Avatar
Master of ROP Translation 6/15/2024 10:23 AM
no i swear
10:23 AM
i inject it correctly
10:23 AM
Avatar
hmmm
10:24 AM
inja={34,7b,31,30,01,30,5c,ea,c8,3d,32,30,7e,94,30,30,34,7b,31,30,11,30,6d,ea,c8,3d,32,30,7e,94,30,30,34,7b,31,30,21,30,7e,ea,c8,3d,32,30,7e,94,30,30,34,7b,31,30,31,30,8f,ea,c8,3d,32,30,7e,94,30,30,74,89,31,30,00,00,02,26,31,30,39,f0,a6,a8,30,30,39,f0,a8,9f,30,30,d8,39,31,30,74,89,31,30,01,00,a0,9c,30,30,30,30,39,f0,02,26,31,30,01,05,3c,9f,30,30,78,5c,31,30,2a,ea,83,3f,32,30,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64}
10:24 AM
maybe use this inja
Avatar
Master of ROP Translation 6/15/2024 10:24 AM
no that inja not work
10:24 AM
it need prefix
Avatar
0x
Avatar
Master of ROP Translation 6/15/2024 10:24 AM
the 0x before hex
Avatar
inja={0x34,0x7b,0x31,0x30,0x01,0x30,0x5c,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x11,0x30,0x6d,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x21,0x30,0x7e,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x31,0x30,0x8f,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x74,0x89,0x31,0x30,0x00,0x00,0x02,0x26,0x31,0x30,0x39,0xf0,0xa6,0xa8,0x30,0x30,0x39,0xf0,0xa8,0x9f,0x30,0x30,0xd8,0x39,0x31,0x30,0x74,0x89,0x31,0x30,0x01,0x00,0xa0,0x9c,0x30,0x30,0x30,0x30,0x39,0xf0,0x02,0x26,0x31,0x30,0x01,0x05,0x3c,0x9f,0x30,0x30,0x78,0x5c,0x31,0x30,0x2a,0xea,0x83,0x3f,0x32,0x30,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64}
10:25 AM
there
Avatar
Master of ROP Translation 6/15/2024 10:28 AM
nothing else
10:28 AM
it didn't scrool
Avatar
whaaaaa
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 10:29 AM
can you set it manually?
10:30 AM
use hex editor to set it
Avatar
Master of ROP Translation 6/15/2024 10:30 AM
set the F039? (edited)
Avatar
telecomadm1145 6/15/2024 10:30 AM
yeah
Avatar
Master of ROP Translation 6/15/2024 10:30 AM
lemme try
Avatar
telecomadm1145 6/15/2024 10:30 AM
if that doesnt work,i might send the wrong version
Avatar
Master of ROP Translation 6/15/2024 10:32 AM
10:32 AM
@totalynce @telecomadm1145
10:32 AM
how about automatic scroll? 🤔
Avatar
telecomadm1145 6/15/2024 10:32 AM
idk why it doesnt scroll
Avatar
hmmm so the rop itslef does not work its not updating the value
10:33 AM
bruh
Avatar
Master of ROP Translation 6/15/2024 10:33 AM
while physical calc works
Avatar
and other emu works but no sfr
Avatar
Master of ROP Translation 6/15/2024 10:33 AM
yea just no effect
Avatar
@Master of ROP Translation have you tried on normal casioemux?
Avatar
telecomadm1145 6/15/2024 10:34 AM
looks like the rop stopped
Avatar
Avatar
totalynce
@Master of ROP Translation have you tried on normal casioemux?
Master of ROP Translation 6/15/2024 10:34 AM
yes
10:34 AM
and i sent you a vid
10:34 AM
that it increased the value at F039
Avatar
very strange
Avatar
telecomadm1145 6/15/2024 10:35 AM
yea
Avatar
Master of ROP Translation 6/15/2024 10:35 AM
I have a way to check
Avatar
telecomadm1145 6/15/2024 10:35 AM
i just registered this as sfr
Avatar
Avatar
Master of ROP Translation
I have a way to check
Master of ROP Translation 6/15/2024 10:35 AM
if "store" value work or not
10:35 AM
by using this:
10:35 AM
34 7b 31 30 39 f0 01 30 d2 03 32 30
10:36 AM
If it stores value 01 into F039, it means our inja script has problem
10:37 AM
oh man
10:37 AM
it stores normally
Avatar
try using my inja
10:38 AM
and add the for loop to inject to the right place
Avatar
Master of ROP Translation 6/15/2024 10:43 AM
where
10:43 AM
gimme your new inj script
Avatar
inja={0x34,0x7b,0x31,0x30,0x01,0x30,0x5c,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x11,0x30,0x6d,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x21,0x30,0x7e,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x31,0x30,0x8f,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x74,0x89,0x31,0x30,0x00,0x00,0x02,0x26,0x31,0x30,0x39,0xf0,0xa6,0xa8,0x30,0x30,0x39,0xf0,0xa8,0x9f,0x30,0x30,0xd8,0x39,0x31,0x30,0x74,0x89,0x31,0x30,0x01,0x00,0xa0,0x9c,0x30,0x30,0x30,0x30,0x39,0xf0,0x02,0x26,0x31,0x30,0x01,0x05,0x3c,0x9f,0x30,0x30,0x78,0x5c,0x31,0x30,0x2a,0xea,0x83,0x3f,0x32,0x30,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64}
10:44 AM
you just need the for loop part
Avatar
telecomadm1145 6/15/2024 10:47 AM
fixed code from casioemuneo
Avatar
Master of ROP Translation 6/15/2024 10:47 AM
yay
Avatar
Avatar
Master of ROP Translation

Launcher 0xD180:

<34 bytes> 78 5c 31 30 de e9 60 0d 32 48
telecomadm1145 6/15/2024 10:48 AM
btw, what an mode
Avatar
Master of ROP Translation 6/15/2024 10:48 AM
34 bytes = 110an
Avatar
telecomadm1145 6/15/2024 10:48 AM
ok
Avatar
Master of ROP Translation 6/15/2024 10:48 AM
and SHIT still not scroll
10:48 AM
I compile the asm 5th times just now (edited)
10:51 AM
10:51 AM
@totalynce @telecomadm1145 check both of them
10:51 AM
the green one is Msvc and the black one is Xyzst version
Avatar
did you try my one?
Avatar
Master of ROP Translation 6/15/2024 10:52 AM
yes and no increase value
10:52 AM
man I know the reason...
10:52 AM
The CasioEmuX isn't counting too
10:53 AM
that's why the Msvc version not work
Avatar
telecomadm1145 6/15/2024 10:53 AM
did xyzst one count?
Avatar
Master of ROP Translation 6/15/2024 10:53 AM
No
10:53 AM
but physical calc counts normally
Avatar
telecomadm1145 6/15/2024 10:54 AM
like might the rom isnt correct ig?
Avatar
what emu did you use to make it coun t then?
Avatar
Avatar
telecomadm1145
like might the rom isnt correct ig?
Master of ROP Translation 6/15/2024 10:54 AM
yea
10:54 AM
rom is not 100% correct
Avatar
Avatar
totalynce
what emu did you use to make it coun t then?
Master of ROP Translation 6/15/2024 10:55 AM
if this not work then I will try the mixup one
10:55 AM
the trippy scrolling
Avatar
what emu did you use to make it count?
Avatar
Master of ROP Translation 6/15/2024 10:56 AM
xyzst
10:56 AM
10:56 AM
Okay the trippy one is better
Avatar
the trippy one actuall works?
Avatar
Master of ROP Translation 6/15/2024 10:57 AM
yea with no reason lol (edited)
Avatar
maybe you accedentially do something to hte hex
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 10:57 AM
bug+bug==working program (edited)
😂 1
Avatar
the trippy one is meant to be paired with screen fading/blending
10:58 AM
as its supposed to be scrolling text both way so the text lkooks like its scrolling both ways at the same time
Avatar
Avatar
totalynce
the trippy one is meant to be paired with screen fading/blending
telecomadm1145 6/15/2024 10:59 AM
what does this look like in real hw
Avatar
Master of ROP Translation 6/15/2024 11:00 AM
YAYY
Avatar
Master of ROP Translation 6/15/2024 11:00 AM
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
can you send inj script?
Avatar
Master of ROP Translation 6/15/2024 11:01 AM
inja={0x34,0x7b,0x31,0x30,0x01,0x30,0x62,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x11,0x30,0x73,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x21,0x30,0x84,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x31,0x30,0x95,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x74,0x89,0x31,0x30,0x00,0x00,0x02,0x26,0x31,0x30,0x39,0xf0,0xa6,0xa8,0x30,0x30,0x39,0xf0,0xa8,0x9f,0x30,0x30,0xd8,0x39,0x31,0x30,0x74,0x89,0x31,0x30,0x00,0x01,0x74,0x89,0x31,0x30,0x00,0x01,0xa0,0x9c,0x30,0x30,0x30,0x30,0x39,0xf0,0x02,0x26,0x31,0x30,0x01,0x05,0x3c,0x9f,0x30,0x30,0x78,0x5c,0x31,0x30,0x30,0xea,0x83,0x3f,0x32,0x30,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64} injb={0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x5c,0x31,0x30,0xde,0xe9,0x60,0x0d,0x32,0x48} for i=0,500 do data[i+0xe9e0]=inja[i+1] end for i=0,50 do data[i+0xd180]=injb[i+1] end
Avatar
k thx
Avatar
Avatar
Master of ROP Translation
The CasioEmuX isn't counting too
an unregistered byte certainly wont change (edited)
Avatar
Avatar
Xyzst
an unregistered byte certainly wont change (edited)
telecomadm1145 6/15/2024 11:02 AM
no its registered
Avatar
Avatar
Xyzst
an unregistered byte certainly wont change (edited)
Master of ROP Translation 6/15/2024 11:02 AM
you reply so late
11:02 AM
it registered lol
11:02 AM
and now it works
Avatar
can you also send launcher inj
Avatar
Master of ROP Translation 6/15/2024 11:02 AM
it just because of wrong inj script
11:02 AM
the injb part
11:02 AM
it's the launcher
Avatar
telecomadm1145 6/15/2024 11:03 AM
11:03 AM
@Xyzst
11:03 AM
Avatar
Avatar
Master of ROP Translation
it's the launcher
can you send launcehr
Avatar
Master of ROP Translation 6/15/2024 11:03 AM
<34 bytes> 78 5c 31 30 de e9 60 0d 32 48
Avatar
Avatar
telecomadm1145
i just registered this as sfr
its actually masked with 0x3F
Avatar
Avatar
Xyzst
its actually masked with 0x3F
Master of ROP Translation 6/15/2024 11:04 AM
i knew
11:04 AM
tested it on hex editor on real hw
11:04 AM
by the way, who can find the addr that can scroll horiziontally?
Avatar
can you send inj for the launcher?
Avatar
Master of ROP Translation 6/15/2024 11:05 AM
injb={0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x5c,0x31,0x30,0xde,0xe9,0x60,0x0d,0x32,0x48} for i=0,500 do data[i+0xe9e0]=inja[i+1] end for i=0,50 do data[i+0xd180]=injb[i+1] end
Avatar
wait
11:05 AM
how do i run it?
Avatar
Master of ROP Translation 6/15/2024 11:05 AM
already in script :)
Avatar
Avatar
totalynce
how do i run it?
Master of ROP Translation 6/15/2024 11:05 AM
easy
11:05 AM
enter 110an
Avatar
Avatar
Master of ROP Translation
enter 110an
how
Avatar
Avatar
totalynce
how
Master of ROP Translation 6/15/2024 11:06 AM
use this modified lua script
Avatar
Master of ROP Translation 6/15/2024 11:06 AM
11:06 AM
input it to the emulator
11:06 AM
then run emu, enter lineI/O then type an_mode(110,0xd180)
11:06 AM
then [enter], then [=] on emu
11:07 AM
then copy the inj script and paste it to the console
Avatar
Avatar
Master of ROP Translation
input it to the emulator
wdym
11:08 AM
in model.lua?
11:08 AM
where
Avatar
Master of ROP Translation 6/15/2024 11:08 AM
11:09 AM
like this
Avatar
thats not a directory
Avatar
telecomadm1145 6/15/2024 11:09 AM
Avatar
thats just recents tab
11:09 AM
just put in emu directory?
Avatar
telecomadm1145 6/15/2024 11:09 AM
11:10 AM
simple
Avatar
Avatar
Master of ROP Translation
then copy the inj script and paste it to the console
then
Avatar
telecomadm1145 6/15/2024 11:12 AM
after injection,what should i do,exe and calc just freeze
Avatar
yeah
11:15 AM
@Master of ROP Translation
Avatar
Master of ROP Translation 6/15/2024 11:15 AM
then type casioemumsvc fx580vnx script=lua-common.lua
11:15 AM
sry
11:15 AM
my wifi is lagging
11:15 AM
i will record a clip
Avatar
????
Avatar
Avatar
totalynce
Click to see attachment 🖼️
telecomadm1145 6/15/2024 11:16 AM
glitching lol
11:16 AM
i might impl that later
Avatar
Master of ROP Translation 6/15/2024 11:16 AM
full instruction
11:18 AM
11:18 AM
@telecomadm1145 @totalynce here you go
Avatar
telecomadm1145 6/15/2024 11:19 AM
btw you can use sharex to record screen
11:19 AM
its free
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 11:20 AM
so we need to set lineio first
👍 1
Avatar
yeay
11:21 AM
i got it
Avatar
telecomadm1145 6/15/2024 11:21 AM
working
Avatar
do you like what we made?
Avatar
telecomadm1145 6/15/2024 11:22 AM
looks interesting
Avatar
what about the trippy one
Avatar
Avatar
totalynce
what about the trippy one
telecomadm1145 6/15/2024 11:23 AM
i wont leave my comment until the screen things are done
Avatar
ok thumbs
Avatar
telecomadm1145 6/15/2024 11:24 AM
it looks bad on emu
Avatar
yeah but real hw
Avatar
telecomadm1145 6/15/2024 11:24 AM
on real hw its awesome
Avatar
thx
11:25 AM
the asm is overly complicated tho
11:25 AM
i tried to make as small as possible any tips tho?
Avatar
telecomadm1145 6/15/2024 11:25 AM
idk
11:26 AM
did quickcpy get translated to 580vnx?
Avatar
yeah
Avatar
Master of ROP Translation 6/15/2024 11:27 AM
small?
11:27 AM
I can do it with 6 lines
11:27 AM
or even 8 lines lol
Avatar
telecomadm1145 6/15/2024 11:28 AM
@totalynce so now what other screen sfrs u want me to impl
Avatar
Avatar
telecomadm1145
@totalynce so now what other screen sfrs u want me to impl
Master of ROP Translation 6/15/2024 11:28 AM
F034
Avatar
telecomadm1145 6/15/2024 11:28 AM
i might or might not impl then
Avatar
Avatar
Master of ROP Translation
F034
what sthat
Avatar
Master of ROP Translation 6/15/2024 11:28 AM
it's the flashing screen effect
Avatar
telecomadm1145 6/15/2024 11:29 AM
can you record that
11:29 AM
i have broken all my casio calcs
cri 1
Avatar
Master of ROP Translation 6/15/2024 11:30 AM
not easy
11:31 AM
Avatar
telecomadm1145 6/15/2024 11:31 AM
what does the value mean?
Avatar
i think its refreshrate
11:32 AM
idk
11:32 AM
on my esp you can shine flourescent lightbulb over top of the screen adn you can slightly see the refresh rate effect
Avatar
telecomadm1145 6/15/2024 11:33 AM
weird sfr
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 11:33 AM
what will happen if u increase the sfr's value
Avatar
try using hex editor
11:34 AM
or set my hex counter address to that sfr
Avatar
Avatar
telecomadm1145
what will happen if u increase the sfr's value
Master of ROP Translation 6/15/2024 11:35 AM
it will flash with high intensity
Avatar
Avatar
Master of ROP Translation
it will flash with high intensity
telecomadm1145 6/15/2024 11:38 AM
slower?
Avatar
Master of ROP Translation 6/15/2024 11:39 AM
yes
Avatar
telecomadm1145 6/15/2024 11:44 AM
huh,stevey's page doesnt have desc about this
Avatar
because no one update it it is what it says (edited)
Avatar
so is it refresh rate?
Avatar
Avatar
telecomadm1145
huh,stevey's page doesnt have desc about this
can you add the desc for me
11:45 AM
just create account
Avatar
Avatar
totalynce
so is it refresh rate?
telecomadm1145 6/15/2024 11:46 AM
idk
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 11:46 AM
what about f036,what does that do
Avatar
Master of ROP Translation 6/15/2024 11:54 AM
hm
11:55 AM
nothing
Avatar
its better to use hex editor
Avatar
Avatar
telecomadm1145
what about f036,what does that do
it would also affect the contrast in some case
Avatar
telecomadm1145 6/15/2024 12:05 PM
how
12:11 PM
scans too slow XD
Avatar
Avatar
telecomadm1145
how
seems f036h decides if f035h will affect the contrast
Avatar
telecomadm1145 6/15/2024 12:34 PM
12:34 PM
simlating lcd scan
Avatar
telecomadm1145 6/15/2024 1:07 PM
fake lcd latency
1:08 PM
@Master of ROP Translation
1:09 PM
would you like to test this feature
1:10 PM
@totalynce tell me if the latency isnt like real hw
Avatar
Make it a bit faster
Avatar
telecomadm1145 6/15/2024 1:11 PM
i have never had a cwx model
Avatar
From vids of inputbo can tell it's slightly faster
Avatar
telecomadm1145 6/15/2024 1:12 PM
actually cwii is at this speed
1:13 PM
cwii's lcd is more slow
Avatar
low battery
Avatar
telecomadm1145 6/15/2024 1:13 PM
how about now
Avatar
Avatar
totalynce
low battery
telecomadm1145 6/15/2024 1:13 PM
just normal version,i think the lcd should be driven at a higher voltage
Avatar
Too fast >¤<
Avatar
telecomadm1145 6/15/2024 1:14 PM
but they just drive the lcd with 1.5v
Avatar
Stupid
1:14 PM
But power efficient
Avatar
telecomadm1145 6/15/2024 1:15 PM
i see some chinese brand make 4 level gray lcds
1:15 PM
and they drive the lcd at 3v or 5v
Avatar
Unless you connect every display pin to transistor or remove the power regulation stuff it's probably impossible to make it better
Avatar
telecomadm1145 6/15/2024 1:16 PM
tbh,i havent seen someone running lcd at 1.5v
1:16 PM
running processor at this voltage is common,but not lcd
1:17 PM
what about now
1:17 PM
@totalynce
1:19 PM
see real hardware
Avatar
telecomadm1145 6/15/2024 1:20 PM
huh my one is faster
Avatar
It's slightly faster than the first
Avatar
telecomadm1145 6/15/2024 1:22 PM
Avatar
battery is approx 1.566V
Avatar
Avatar
telecomadm1145
Click to see attachment 🖼️
Perfect
1:23 PM
Now try trippy spell
Avatar
telecomadm1145 6/15/2024 1:24 PM
im lazy to inject now
1:24 PM
ill compile it for you
1:25 PM
oh i forget about the status bar
1:25 PM
but still ok
1:26 PM
1:26 PM
just replace the same file
1:26 PM
@totalynce
Avatar
Ok
1:26 PM
Ilk try later cuz I need to go to concert
Avatar
Avatar
Master of ROP Translation
inja={0x34,0x7b,0x31,0x30,0x01,0x30,0x62,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x11,0x30,0x73,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x21,0x30,0x84,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x34,0x7b,0x31,0x30,0x31,0x30,0x95,0xea,0xc8,0x3d,0x32,0x30,0x7e,0x94,0x30,0x30,0x74,0x89,0x31,0x30,0x00,0x00,0x02,0x26,0x31,0x30,0x39,0xf0,0xa6,0xa8,0x30,0x30,0x39,0xf0,0xa8,0x9f,0x30,0x30,0xd8,0x39,0x31,0x30,0x74,0x89,0x31,0x30,0x00,0x01,0x74,0x89,0x31,0x30,0x00,0x01,0xa0,0x9c,0x30,0x30,0x30,0x30,0x39,0xf0,0x02,0x26,0x31,0x30,0x01,0x05,0x3c,0x9f,0x30,0x30,0x78,0x5c,0x31,0x30,0x30,0xea,0x83,0x3f,0x32,0x30,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64} injb={0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x5c,0x31,0x30,0xde,0xe9,0x60,0x0d,0x32,0x48} for i=0,500 do data[i+0xe9e0]=inja[i+1] end for i=0,50 do data[i+0xd180]=injb[i+1] end
telecomadm1145 6/15/2024 2:39 PM
with blending on
Avatar
telecomadm1145 6/15/2024 4:38 PM
f034
Avatar
Avatar
telecomadm1145
f034
Master of ROP Translation 6/15/2024 4:41 PM
cool
4:41 PM
did you update it in casioemumsvc.exe?
Avatar
telecomadm1145 6/15/2024 4:42 PM
still debugging
4:42 PM
idk when will i make this done
Avatar
telecomadm1145 6/15/2024 4:52 PM
updated
Avatar
Master of ROP Translation 6/15/2024 4:56 PM
can I test now?
Avatar
telecomadm1145 6/15/2024 4:56 PM
wait
4:56 PM
im compiling
4:58 PM
4:58 PM
should be ok
Avatar
Master of ROP Translation 6/15/2024 4:59 PM
shit defender
4:59 PM
it says "threats found"
Avatar
telecomadm1145 6/15/2024 4:59 PM
oh i forget to switch language back to english,if you dont mind,it would be ok
Avatar
Avatar
Master of ROP Translation
it says "threats found"
telecomadm1145 6/15/2024 4:59 PM
ms hates msvc ig
5:01 PM
btw what did it report
5:01 PM
i could fix that maybe
Avatar
Avatar
telecomadm1145
oh i forget to switch language back to english,if you dont mind,it would be ok
telecomadm1145 6/15/2024 5:02 PM
eng ver
Avatar
Master of ROP Translation 6/15/2024 5:02 PM
it just says threats found lol
5:02 PM
i turrned off
5:02 PM
and now it's fine :))) (edited)
5:02 PM
and that version support paste hex right?
Avatar
telecomadm1145 6/15/2024 5:03 PM
i fixed injector copied from casioemuneo
5:03 PM
tho i dont know whether it works like casioemuneo
Avatar
Master of ROP Translation 6/15/2024 5:03 PM
just a bit same is okay
5:03 PM
no need to 100% same
5:06 PM
5:06 PM
so good lol
Avatar
telecomadm1145 6/15/2024 5:07 PM
should be the first emu can emulate flashing screen
🤣 1
Avatar
Master of ROP Translation 6/15/2024 5:08 PM
and support scrolling vertically too
5:08 PM
and it used nX-U16 with good SFR right?
Avatar
telecomadm1145 6/15/2024 5:08 PM
wdym
Avatar
Master of ROP Translation 6/15/2024 5:09 PM
the emu used nX-U16 chipset? (edited)
Avatar
telecomadm1145 6/15/2024 5:09 PM
nx u16 is the same as nx u8
5:09 PM
just a little difference
5:10 PM
technically its originally nxu8 emulator (edited)
Avatar
Master of ROP Translation 6/15/2024 5:10 PM
especially the tetris program, you can't run it directly on nX-U16 emu
Avatar
telecomadm1145 6/15/2024 5:10 PM
but xyzst fixed some nxu8 feature to make it like nxu16
Avatar
Avatar
Master of ROP Translation
and support scrolling vertically too
telecomadm1145 6/15/2024 5:11 PM
btw did you find the sfr can scroll vertically in real hw?
Avatar
Master of ROP Translation 6/15/2024 5:12 PM
yes it's the same
5:12 PM
F039
Avatar
Avatar
Master of ROP Translation
F039
telecomadm1145 6/15/2024 5:13 PM
can you show me how it affect the screen
Avatar
Master of ROP Translation 6/15/2024 5:16 PM
i'm busy chatting-voice with x_relt_x
5:17 PM
i 'll send you clip later
Avatar
Avatar
telecomadm1145
can you show me how it affect the screen
telecomadm1145 6/15/2024 5:32 PM
oh i forget you should have posted before
Avatar
nice you update your pfp
Avatar
Avatar
totalynce
nice you update your pfp
telecomadm1145 6/15/2024 5:44 PM
* also get hacker role
Avatar
i had hacker role
5:44 PM
but now its for people who are really smart
5:45 PM
i hope ill get it back one day
Avatar
Master of ROP Translation 6/15/2024 6:00 PM
lol
Avatar
Avatar
totalynce
i had hacker role
The Administrator 6/15/2024 6:00 PM
back in the day anyone who messed around with random bugs and glitches could get the hacker role these days, it is for people who actually achieve something technical
Avatar
where is the cursor pos
6:30 PM
what address
Avatar
telecomadm1145 6/15/2024 6:30 PM
wdym
6:30 PM
character pos or xy pos
6:30 PM
which model
Avatar
es/es-plus
6:31 PM
character pos
Avatar
telecomadm1145 6/15/2024 6:31 PM
0x8110
Avatar
d_08114 cursor_xcor d_08115 cursor_ycor
6:32 PM
on esp
Avatar
telecomadm1145 6/15/2024 6:32 PM
he mean character pos
Avatar
yeah so
6:32 PM
i found?
6:32 PM
something
Avatar
oh
Avatar
has anybody just put like
6:32 PM
a bunch of ( after doing 1/1r
Avatar
telecomadm1145 6/15/2024 6:33 PM
that will create plenty of garbage in stack
Avatar
yeah but like
Avatar
telecomadm1145 6/15/2024 6:33 PM
what have you found
Avatar
it will go into the equation buffer
6:33 PM
and overwrite everything
6:33 PM
so basically i think it can write after the 99 limit?
Avatar
telecomadm1145 6/15/2024 6:34 PM
we call that overflow normally
Avatar
wait a sec (edited)
6:34 PM
let me check something
Avatar
ac left equals after typing more than 100 bytes in equation erea
6:34 PM
for a rop chain'
Avatar
telecomadm1145 6/15/2024 6:34 PM
and there's more simple method to achieve this
6:34 PM
like x=sigma(x,1,1x10^5
Avatar
Master of ROP Translation 6/15/2024 6:35 PM
yea
Avatar
Avatar
x_relt_x
so basically i think it can write after the 99 limit?
telecomadm1145 6/15/2024 6:36 PM
but you cannot calcuate normally after breaking this limit
6:36 PM
it will create a infinite strcpy then corrupt the stack (edited)
Avatar
strcpy_null go wham
Avatar
Master of ROP Translation 6/15/2024 6:36 PM
use overflow method rather than r
Avatar
and we exploit that
Avatar
Master of ROP Translation 6/15/2024 6:37 PM
and I don't think that we can activate display glitches on 570ES/82ES
6:38 PM
when using 1/1r method
Avatar
LOL
6:39 PM
IT GOES PAST
Avatar
Master of ROP Translation 6/15/2024 6:39 PM
lol
6:39 PM
and i love unsstable char
Avatar
telecomadm1145 6/15/2024 6:39 PM
btw whats the game emulator
Avatar
Master of ROP Translation 6/15/2024 6:40 PM
that emu is cool
6:40 PM
it's like 8-bit game
Avatar
telecomadm1145 6/15/2024 6:40 PM
can you take a full screenshot
6:40 PM
@x_relt_x
6:41 PM
okay so
6:41 PM
yeah its really easy to write past the equation buffer
6:41 PM
on fx-es
Avatar
Master of ROP Translation 6/15/2024 6:42 PM
i love unstable char
Avatar
telecomadm1145 6/15/2024 6:42 PM
thats a timer actually
Avatar
yeah so like
6:43 PM
whats important after the equation buffer
6:43 PM
anything that i could set to be whatever
6:43 PM
or is there like (edited)
6:43 PM
nothing
Avatar
Avatar
x_relt_x
or is there like (edited)
telecomadm1145 6/15/2024 6:44 PM
there should be a label file
Avatar
Master of ROP Translation 6/15/2024 6:44 PM
ES model doesn't have label file
Avatar
this is rom018
Avatar
Master of ROP Translation 6/15/2024 6:44 PM
sucks
Avatar
Avatar
Master of ROP Translation
ES model doesn't have label file
Master of ROP Translation 6/15/2024 6:44 PM
only ES+
Avatar
Avatar
Master of ROP Translation
ES model doesn't have label file
telecomadm1145 6/15/2024 6:44 PM
rom label?
Avatar
Master of ROP Translation 6/15/2024 6:44 PM
yea
6:45 PM
rom label like diagnostic, draw_byte, etc
Avatar
telecomadm1145 6/15/2024 6:45 PM
idk if theres es real rom
Avatar
Master of ROP Translation 6/15/2024 6:45 PM
yes that's an old model
Avatar
telecomadm1145 6/15/2024 6:45 PM
which one
Avatar
Master of ROP Translation 6/15/2024 6:45 PM
maybe find it on tieba
Avatar
Avatar
telecomadm1145
which one
Master of ROP Translation 6/15/2024 6:45 PM
570ES and 82ES
6:45 PM
both are ROM 01x
Avatar
Avatar
x_relt_x
nothing
telecomadm1145 6/15/2024 6:45 PM
not nothing actually
Avatar
Master of ROP Translation 6/15/2024 6:46 PM
6:46 PM
I have 570ES disas (real rom)
6:47 PM
if someone could translate the label from 570ES+ to 570ES, that would be good
Avatar
Avatar
telecomadm1145
not nothing actually
telecomadm1145 6/15/2024 6:47 PM
wait ill take a screenshot of labeled hex editor
Avatar
Avatar
Master of ROP Translation
both are ROM 01x
ay
Avatar
Avatar
Master of ROP Translation
570ES and 82ES
telecomadm1145 6/15/2024 6:49 PM
btw 570es and 82es should use the same rom?
Avatar
all es use the same rom iirc
6:50 PM
wait no
6:50 PM
lots of them do
Avatar
heres the method
Avatar
Master of ROP Translation 6/15/2024 6:50 PM
not really
6:50 PM
interesting
6:51 PM
a lot of "("
Avatar
telecomadm1145 6/15/2024 6:51 PM
mathi junk
Avatar
yeah
6:51 PM
it just trashes the equation buffer
6:51 PM
but that allows you to just
6:51 PM
write past
Avatar
telecomadm1145 6/15/2024 6:52 PM
huh forget to translate it to english
6:53 PM
after equation buffer,there is another buffer
6:53 PM
which is used to backup equation calced last time
6:54 PM
then there will be a timer called "unstable char" could be used to get any char
Avatar
when is the timer?
Avatar
telecomadm1145 6/15/2024 6:55 PM
about 208 bytes
Avatar
hah
Avatar
telecomadm1145 6/15/2024 6:55 PM
or 208 character
Avatar
so like
6:55 PM
whats stopping us from just using it
6:55 PM
we can get any character
6:55 PM
because we can just, leave the equation area willy nilly
Avatar
telecomadm1145 6/15/2024 6:56 PM
btw you called equation area is what we called input area
Avatar
ah ok
Avatar
Avatar
x_relt_x
because we can just, leave the equation area willy nilly
telecomadm1145 6/15/2024 6:57 PM
and esp rop chain need this timer to build
6:57 PM
since esp doesnt have too many glitches to use
6:57 PM
cursor's at the position (edited)
Avatar
Master of ROP Translation 6/15/2024 6:58 PM
also
6:58 PM
why i can't paste hex in your emu? @telecomadm1145
Avatar
Avatar
x_relt_x
Click to see attachment 🖼️
telecomadm1145 6/15/2024 6:58 PM
you need to press left and right to see it change
Avatar
its not shown
Avatar
Avatar
telecomadm1145
you need to press left and right to see it change
Master of ROP Translation 6/15/2024 6:58 PM
not show, he voiced-chat with me
6:59 PM
and every display glitch is not shown
6:59 PM
it just stuck
Avatar
telecomadm1145 6/15/2024 6:59 PM
like there's incorrect impl in his emu?
Avatar
Avatar
telecomadm1145
like there's incorrect impl in his emu?
Master of ROP Translation 6/15/2024 6:59 PM
maybe incorrect implement
Avatar
same thing happened on real hardware though
Avatar
Avatar
x_relt_x
same thing happened on real hardware though
Master of ROP Translation 6/15/2024 7:00 PM
real hardware should display (edited)
Avatar
Avatar
Master of ROP Translation
why i can't paste hex in your emu? @telecomadm1145
telecomadm1145 6/15/2024 7:00 PM
what did you do
Avatar
Avatar
telecomadm1145
what did you do
Master of ROP Translation 6/15/2024 7:00 PM
copy hex from notepad
7:00 PM
then paste to the inject hex box but it didn't show
7:01 PM
it was the blank box
Avatar
telecomadm1145 6/15/2024 7:01 PM
oh ik
7:02 PM
write address here
7:02 PM
then paste hex in the below box
7:02 PM
and "Inject hex"
Avatar
Master of ROP Translation 6/15/2024 7:02 PM
yes i did it
7:03 PM
but the big box isn't showwn
7:03 PM
it should show my hex
Avatar
telecomadm1145 6/15/2024 7:03 PM
you mean the hex editor in the top?
Avatar
Master of ROP Translation 6/15/2024 7:03 PM
No
7:03 PM
the blue big box
Avatar
telecomadm1145 6/15/2024 7:03 PM
so you cannot paste into it?
Avatar
Master of ROP Translation 6/15/2024 7:03 PM
yea
7:03 PM
7:04 PM
it didn't display like this (take this as e.g)
7:04 PM
it just a blank box
Avatar
oh i think i know why the glitch works
7:04 PM
basically
7:04 PM
the displayed ( cause the stack to go into the end of the equation buffer (edited)
7:04 PM
making the null byte at the end not exist
7:05 PM
and that allows you to just go past it
Avatar
telecomadm1145 6/15/2024 7:05 PM
cannot reproduce your bug
Avatar
Avatar
x_relt_x
the displayed ( cause the stack to go into the end of the equation buffer (edited)
telecomadm1145 6/15/2024 7:05 PM
no thats mathi garbage actually
7:05 PM
but es just place math input garbage near the stack
Avatar
dawg
7:06 PM
thats what im saying
7:06 PM
when it tries to process all the shown (
7:06 PM
the stack goes so far that it overwrites the null byte at the end of the buffer (edited)
Avatar
Avatar
Master of ROP Translation
yea
telecomadm1145 6/15/2024 7:06 PM
did you turn your ime off? (edited)
Avatar
Avatar
telecomadm1145
did you turn your ime off? (edited)
Master of ROP Translation 6/15/2024 7:06 PM
wdym
7:07 PM
try paste this
Avatar
telecomadm1145 6/15/2024 7:07 PM
oh ik why
7:07 PM
its too long
7:07 PM
i need to increase buffer size
7:08 PM
7:08 PM
the buffer is 1024 bytes long
7:08 PM
however you want to input 1815 bytes
Avatar
Master of ROP Translation 6/15/2024 7:09 PM
increase to 9999999999999999999999999999999e+9999 (edited)
7:09 PM
jk
Avatar
telecomadm1145 6/15/2024 7:09 PM
you can split it i think
Avatar
Avatar
Master of ROP Translation
increase to 9999999999999999999999999999999e+9999 (edited)
telecomadm1145 6/15/2024 7:09 PM
+inf
7:09 PM
(nan)
7:10 PM
increased to 64k
Avatar
Master of ROP Translation 6/15/2024 7:10 PM
yes
7:10 PM
65535 = FFFF
7:10 PM
that's better now
Avatar
telecomadm1145 6/15/2024 7:11 PM
huh
7:11 PM
imgui have routines to get clipboard text
Avatar
Master of ROP Translation 6/15/2024 7:14 PM
so now does it paste? (edited)
7:15 PM
7:15 PM
hehe (edited)
Avatar
telecomadm1145 6/15/2024 7:17 PM
label viewer
Avatar
Master of ROP Translation 6/15/2024 7:19 PM
also
7:20 PM
F034 is masked with 3F (max)
7:20 PM
you increased it to FF 🤣
Avatar
where is /emuverify?
Avatar
telecomadm1145 6/15/2024 7:20 PM
botspam
Avatar
Master of ROP Translation 6/15/2024 7:20 PM
wrong channel :/
Avatar
telecomadm1145 6/15/2024 7:21 PM
you can directly register by asking happy sheep
Avatar
Avatar
Master of ROP Translation
F034 is masked with 3F (max)
telecomadm1145 6/15/2024 7:22 PM
huh
7:22 PM
fix next time ig
Avatar
Master of ROP Translation 6/15/2024 7:26 PM
also can you implement the grayscale color?
7:26 PM
like draw 3 colors
7:27 PM
1. gray (low contrast) 2. gray 3. black
Avatar
allready done
7:28 PM
its by sweitching pixel on/off to create illusion
Avatar
telecomadm1145 6/15/2024 7:31 PM
retuned flashing simulating
Avatar
nice
Avatar
telecomadm1145 6/15/2024 7:32 PM
also,a panel to tune this (edited)
7:32 PM
Avatar
Master of ROP Translation 6/15/2024 7:33 PM
Avatar
telecomadm1145 6/15/2024 7:33 PM
have you tuned the speed?
7:33 PM
using the slider in the bottom
Avatar
Master of ROP Translation 6/15/2024 7:34 PM
good tetris
Avatar
can one of u guys do trippy scroll spell on the emu?
7:34 PM
i dont have access to a windows device
Avatar
Master of ROP Translation 6/15/2024 7:34 PM
I will do
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 7:35 PM
play tetris with flashing screen effect
7:35 PM
plz
Avatar
Avatar
telecomadm1145
play tetris with flashing screen effect
Master of ROP Translation 6/15/2024 7:35 PM
LOL THIS IS COOL
7:37 PM
hmm
7:38 PM
slower flash or fast flash?
Avatar
what going on here
Avatar
Avatar
Steveyboi
what going on here
Master of ROP Translation 6/15/2024 7:38 PM
we are testing SFR (edited)
Avatar
Avatar
Steveyboi
what going on here
telecomadm1145 6/15/2024 7:38 PM
flashing effect on emu
Avatar
Avatar
Master of ROP Translation
we are testing SFR (edited)
this is boring (for you) (edited)
Avatar
Avatar
telecomadm1145
flashing effect on emu
alright
Avatar
telecomadm1145 6/15/2024 7:39 PM
actually im making the screen more like realhw
7:40 PM
@Steveyboi would you like to impl f034 in ur emu
Avatar
not anytime soon, i think i need to focus on making my emulator faster first
7:41 PM
currently its like ES speed when running classwiz
7:41 PM
super slow
7:41 PM
takes like 10 sec to draw CWII menus (edited)
Avatar
telecomadm1145 6/15/2024 7:41 PM
lol
Avatar
dont use python
Avatar
Master of ROP Translation 6/15/2024 7:42 PM
7:43 PM
F034: FF
7:44 PM
@telecomadm1145 how do you feel? :)
Avatar
Avatar
telecomadm1145
lol
this is how slow it is (edited)
Avatar
Master of ROP Translation 6/15/2024 7:45 PM
🤣
Avatar
telecomadm1145 6/15/2024 7:46 PM
huh no wonder why i get weird screen fading effect on cwii
Avatar
Avatar
Master of ROP Translation
🤣
^^ this guy up here trying to be funni
7:46 PM
i'm serious about this
7:46 PM
this thing is very slow
Avatar
Avatar
telecomadm1145
huh no wonder why i get weird screen fading effect on cwii
telecomadm1145 6/15/2024 7:46 PM
cwii simply draws the menu so slow
Avatar
though it does let me see the drawing process in slow-motion, thats a good thing (ig)
Avatar
Master of ROP Translation 6/15/2024 7:46 PM
slowmotion emu ever
Avatar
telecomadm1145 6/15/2024 7:46 PM
no i can do that in casioemu too
7:46 PM
just change the cps
Avatar
oh yeah
7:47 PM
though my emulator has a built in buffer switcher
Avatar
@Master of ROP Translation pls try the trippy spell on emu
Avatar
Avatar
Steveyboi
this is how slow it is (edited)
hell someone make it faster
Avatar
telecomadm1145 6/15/2024 7:50 PM
cpp
Avatar
well i tried to make it faster by rewriting some code in C
Avatar
Master of ROP Translation 6/15/2024 7:51 PM
7:51 PM
look like real HW 🥳 @totalynce
Avatar
Avatar
Steveyboi
well i tried to make it faster by rewriting some code in C
probably have to rewrite like the whole MCU part in C
7:51 PM
only screen and stuff in python
Avatar
telecomadm1145 6/15/2024 7:51 PM
just use casioemu as backend ig
Avatar
oh it looks so wierd on the emu
Avatar
Avatar
totalynce
oh it looks so wierd on the emu
telecomadm1145 6/15/2024 7:52 PM
you can adjust the lcd latency
Avatar
Avatar
telecomadm1145
just use casioemu as backend ig
well ig i can switch out the core
7:52 PM
again
Avatar
like so trippy, i got the effect i wanted
Avatar
Master of ROP Translation 6/15/2024 7:52 PM
also Stevey, do you know how to restore stack perfectly?
7:52 PM
both of you are pro
Avatar
Avatar
Steveyboi
well ig i can switch out the core
though there needs to be code changes so it works as a standalone shared object
Avatar
@Master of ROP Translation can you replace 2nd and 3rd line with spaces in trip scrol spell?
Avatar
Avatar
Master of ROP Translation
also Stevey, do you know how to restore stack perfectly?
telecomadm1145 6/15/2024 7:53 PM
restore to normal calc?
Avatar
Master of ROP Translation 6/15/2024 7:54 PM
Avatar
Avatar
Master of ROP Translation
also Stevey, do you know how to restore stack perfectly?
you use memcpy, er0 = start of loop er2 = backup of loop, next 2 bytes = length of loop, you can set to 0101 to be safe but the backup loop must contain everything after loop aswell including the resore code
7:54 PM
but
7:54 PM
something doesnt even allow us to get to that stage when using smallprint
Avatar
Avatar
Steveyboi
though there needs to be code changes so it works as a standalone shared object
can you try @telecomadm1145? also i kinda also want a "customizable" type, like add in ML620Q418A for TI MathPrint or sth
Avatar
telecomadm1145 6/15/2024 7:55 PM
no im lazy
Avatar
:/
Avatar
telecomadm1145 6/15/2024 7:56 PM
casioemu just have too many gui binds
Avatar
Avatar
Master of ROP Translation
also Stevey, do you know how to restore stack perfectly?
telecomadm1145 6/15/2024 7:57 PM
i dont think this is a issue related to stack tho
Avatar
Avatar
telecomadm1145
casioemu just have too many gui binds
hmm, maybe you can start by adding "U8" mode?
7:58 PM
or is it already present after xyzst modified it
Avatar
telecomadm1145 6/15/2024 7:58 PM
wdym
Avatar
you can switch between U8 and U16 core as needed in the model.lua
7:58 PM
or sth like that
Avatar
telecomadm1145 6/15/2024 7:59 PM
that should be not present in xyzst's one
Avatar
yeah alright
Avatar
telecomadm1145 6/15/2024 7:59 PM
the old codebase is simulating nxu8
7:59 PM
and xyzst modified to simulate nxu16
Avatar
and... now we add U8 again (but as a config option)
Avatar
Master of ROP Translation 6/15/2024 8:00 PM
Avatar
default will still be U16
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
telecomadm1145 6/15/2024 8:00 PM
cool rop chain
🥰 1
Avatar
ahhh so trippy
Avatar
85651 0.041 0.000 0.054 0.000 main.py:1749(keyboard) well looks like keyboard takes a lot of time
Avatar
Original message was deleted or could not be loaded.
telecomadm1145 6/15/2024 8:07 PM
idk why
Avatar
maybe its non writeable
8:07 PM
sfr area
Avatar
telecomadm1145 6/15/2024 8:07 PM
no
Avatar
oh
Avatar
Avatar
Steveyboi
85651 0.041 0.000 0.054 0.000 main.py:1749(keyboard) well looks like keyboard takes a lot of time
def keyboard(self): ki = 0xff if len(self.keys_pressed) > 0: ko = self.sim.sfr[0x44] ^ 0xff if self.ko_mode else self.sim.sfr[0x46] try: for val in self.keys_pressed: if val == None: continue if ko & (1 << val[1]): ki &= ~(1 << val[0]) except RuntimeError: pass self.sim.sfr[0x40] = ki if not config.real_hardware: temp = self.read_emu_kb(0) if temp in (2, 8) and [self.read_emu_kb(i) for i in (1, 2)] != [1<<2, 1<<4]: self.write_emu_kb(0, 0) elif temp in (5, 7) and not self.qr_active: self.qr_active = True tk.messagebox.showinfo('QR code', 'Detected emulator ROM QR code!\nGet the URL with right-click > Extra functions > QR code export > Copy URL to clipboard\n\nNote: due to the nature of the emulator, you might not see the QR code immediately') elif temp == 6: self.qr_active = False
8:07 PM
is there any optimizations i can make
Avatar
telecomadm1145 6/15/2024 8:07 PM
the navigation key have bugs
8:07 PM
idk how
8:08 PM
might caused by sdl
Avatar
its super weird
8:08 PM
one of the reasons why you shouldnt use casioemux/neo/idk
rageface 1
noice 1
Avatar
Avatar
Steveyboi
def keyboard(self): ki = 0xff if len(self.keys_pressed) > 0: ko = self.sim.sfr[0x44] ^ 0xff if self.ko_mode else self.sim.sfr[0x46] try: for val in self.keys_pressed: if val == None: continue if ko & (1 << val[1]): ki &= ~(1 << val[0]) except RuntimeError: pass self.sim.sfr[0x40] = ki if not config.real_hardware: temp = self.read_emu_kb(0) if temp in (2, 8) and [self.read_emu_kb(i) for i in (1, 2)] != [1<<2, 1<<4]: self.write_emu_kb(0, 0) elif temp in (5, 7) and not self.qr_active: self.qr_active = True tk.messagebox.showinfo('QR code', 'Detected emulator ROM QR code!\nGet the URL with right-click > Extra functions > QR code export > Copy URL to clipboard\n\nNote: due to the nature of the emulator, you might not see the QR code immediately') elif temp == 6: self.qr_active = False
telecomadm1145 6/15/2024 8:09 PM
looks no problem
Avatar
ahhhhhh
8:15 PM
maybe
8:15 PM
its
8:15 PM
because
8:15 PM
the region setup
8:15 PM
i make it
8:15 PM
a giant SFR space
8:16 PM
the write sfr code
8:16 PM
is a lot of code
8:20 PM
this is why i said "i want it to be customizable"
Avatar
telecomadm1145 6/15/2024 8:50 PM
@Steveyboi btw have you tried 186an in 880btg
Avatar
no crashes
9:18 PM
what do i do next
Avatar
are there any emus that can spell?
9:22 PM
(ielts 0.5)
Avatar
spelling is boring af
Avatar
i see it
9:23 PM
btw there is 991cnx only
Avatar
❗ ❗ ❗ ❗ ❗ ❗ ❗
Avatar
(deleted)
Avatar
screenshotted
Avatar
nah where is the 580vnx emu actually
9:25 PM
iwasjokingbro
Avatar
Avatar
Steveyboi
no crashes
telecomadm1145 6/15/2024 9:39 PM
wait
9:39 PM
should i record that for u
Avatar
Avatar
Rockyest
btw there is 991cnx only
telecomadm1145 6/15/2024 9:40 PM
since this model is well researched by tieba hackers
9:40 PM
also 580vnx is get dumped
9:40 PM
so you can use that too
Avatar
ok i can spell chinese:)
9:40 PM
F1__
Avatar
Avatar
telecomadm1145
should i record that for u
sure...
9:41 PM
though idk how to get in 186an with math 68
Avatar
Avatar
Master of ROP Translation
Click to see attachment 🖼️
where can i download this emu?
Avatar
Master of ROP Translation 6/15/2024 9:42 PM
find it in this channel (edited)
Avatar
Avatar
Steveyboi
though idk how to get in 186an with math 68
telecomadm1145 6/15/2024 9:43 PM
huh
9:43 PM
easy
Avatar
like, idk how to get an in math 68
Avatar
telecomadm1145 6/15/2024 9:44 PM
i have my own method,and i know a more complicated method,which one would you like to try
Avatar
how about your method first
Avatar
telecomadm1145 6/15/2024 9:44 PM
first doing 1/1 in mathio
9:44 PM
switch to lineio
Avatar
ok
Avatar
telecomadm1145 6/15/2024 9:45 PM
then: frac @@ 1 @@ 1 * @@ input frac in the place of star mark
9:46 PM
then get an like reset 68
9:46 PM
wait i need to record a video
9:49 PM
9:49 PM
ez
Avatar
advanced off topic hunter 6/15/2024 9:50 PM
wait telecomadm1145 have an avatar now
Avatar
telecomadm1145 6/15/2024 9:50 PM
just like reset 68
Avatar
thats pretty interesting
Avatar
Avatar
advanced off topic hunter
wait telecomadm1145 have an avatar now
telecomadm1145 6/15/2024 9:51 PM
in china,you cannot connect to discord normally,so i didnt use it in my daily life before
Avatar
advanced off topic hunter 6/15/2024 9:52 PM
oh:))
Avatar
Avatar
telecomadm1145
just like reset 68
telecomadm1145 6/15/2024 9:53 PM
except you cannot see whats happening,this is very convenient
9:53 PM
i used this trick to enter spelling rop before
Avatar
Avatar
Steveyboi
thats pretty interesting
telecomadm1145 6/15/2024 9:54 PM
have you entered 186an in math68 mode
Avatar
yeah
Avatar
telecomadm1145 6/15/2024 9:54 PM
then open variable menu
9:55 PM
press ok
9:55 PM
huh
9:55 PM
why he said press AC after opening variable?
Avatar
Avatar
Steveyboi
Click to see attachment 🖼️
telecomadm1145 6/15/2024 9:55 PM
huh
9:56 PM
ig both is fine
9:56 PM
and if you pressed back and ok,you will lose math68 (edited)
Avatar
yeah
9:56 PM
ik
Avatar
telecomadm1145 6/15/2024 9:56 PM
ill record that
9:57 PM
wait a while
9:59 PM
10:01 PM
btw this isnt a stable way to get characters
10:02 PM
i would rather using memcpy instead of this
Avatar
its not working for me for some reason
10:03 PM
i want to get F hex
10:03 PM
but it doesnt work
Avatar
telecomadm1145 6/15/2024 10:03 PM
how
10:03 PM
what did you input
10:04 PM
or you entered wrong an mode
10:05 PM
... or what did you get
Avatar
absolutely nothing
10:06 PM
it might have to do with me switching from lineio to mathio after inputting 186an?
Avatar
telecomadm1145 6/15/2024 10:06 PM
no
10:06 PM
did you open the variable menu?
10:06 PM
that's a key
Avatar
i definitely did
10:07 PM
oh, and now 186an crash
10:07 PM
it worked before
Avatar
telecomadm1145 6/15/2024 10:07 PM
then you need to reset all
10:07 PM
you cannot enter 186an in math 68 again
10:07 PM
i tried,it would crash
Avatar
Avatar
Steveyboi
absolutely nothing
telecomadm1145 6/15/2024 10:08 PM
just the original formula?
Avatar
no like
10:08 PM
literally
10:08 PM
nothing
Avatar
telecomadm1145 6/15/2024 10:08 PM
what does it look like
Avatar
no characters
Avatar
telecomadm1145 6/15/2024 10:09 PM
huh
Avatar
like normal
Avatar
telecomadm1145 6/15/2024 10:09 PM
you might get into the wrong an mode
10:09 PM
or just doesnt work in other cwii
Avatar
it works on fx-880BTG emulator ROM tho
10:10 PM
so it must work on real
Avatar
Avatar
Steveyboi
it works on fx-880BTG emulator ROM tho
telecomadm1145 6/15/2024 10:10 PM
huh
10:10 PM
then you must did something wrong
Avatar
do i do the variable thing before or after switching to mathio
Avatar
telecomadm1145 6/15/2024 10:13 PM
switch mathio doesnt matter in 186an
10:13 PM
except you have inputed something
Avatar
yeah still not working
Avatar
telecomadm1145 6/15/2024 10:14 PM
weird
10:14 PM
what about 8200au
Avatar
no math 68 on fx-8200 AU atm
10:15 PM
or is there a way to get it on all CWII
Avatar
telecomadm1145 6/15/2024 10:15 PM
which method did you used to get math 68?
10:15 PM
fdfd c0 is the method i know
Avatar
for fx-880BTG i used an hackstring in equation mode
10:16 PM
oh
Avatar
telecomadm1145 6/15/2024 10:16 PM
that might be the reason
Avatar
yeah
Avatar
telecomadm1145 6/15/2024 10:16 PM
you corrupted something before
10:16 PM
iirc fdfd c0 exe 128 numbers frac home (edited)
10:16 PM
you can try this on emu first
10:17 PM
it will corrupt this byte with 0xc0
10:18 PM
in mathio btw
10:18 PM
after fdfd c0 exe,you will get syntax error
10:18 PM
then overflow
Avatar
i will try later
Avatar
telecomadm1145 6/15/2024 10:19 PM
there should be some post about this
10:20 PM
fx-991/999..众所周知,CWII系列前挪了设置区,导致定向填充直接修改模式理论上需要打210个数字(计上x=),这是根本做不到的。但是修改菜单光标只需要130个数字,而每一个菜单图标都对应一个模式,因此有了这个思路
10:20 PM
my method is the same as his,just he used x=aain>cmto build fdfdc0
Avatar
Master of ROP Translation 6/15/2024 10:22 PM
what's going on? Try entering 186an on 880BTG?
Avatar
Avatar
Master of ROP Translation
what's going on? Try entering 186an on 880BTG?
telecomadm1145 6/15/2024 10:22 PM
do you have cwii btw
Avatar
Master of ROP Translation 6/15/2024 10:22 PM
yes
10:22 PM
i have both CWI and CWII
10:22 PM
even MS model
Avatar
telecomadm1145 6/15/2024 10:23 PM
we are discussing about new method to get characters in cwii
10:23 PM
which is 186an
Avatar
Master of ROP Translation 6/15/2024 10:23 PM
but why all of you are discussing about entering 186an mode?
Avatar
Avatar
telecomadm1145
Click to see attachment 🖼️
telecomadm1145 6/15/2024 10:23 PM
see this
Avatar
Avatar
Master of ROP Translation
but why all of you are discussing about entering 186an mode?
telecomadm1145 6/15/2024 10:23 PM
no we are talking about 186an's feature
10:24 PM
also "directional filling" to get math68
Avatar
Avatar
telecomadm1145
Click to see attachment 🖼️
Master of ROP Translation 6/15/2024 10:26 PM
wtf GCD on 991CN CW?
Avatar
telecomadm1145 6/15/2024 10:26 PM
yes
Avatar
Master of ROP Translation 6/15/2024 10:26 PM
but what is Math68? The first time i hear it
Avatar
Avatar
Master of ROP Translation
but what is Math68? The first time i hear it
telecomadm1145 6/15/2024 10:27 PM
mode68 with mathio and lineio
10:27 PM
switching mathio wont clear history
10:27 PM
also reset
Avatar
Avatar
Master of ROP Translation
wtf GCD on 991CN CW?
telecomadm1145 6/15/2024 10:29 PM
10:29 PM
can get those characters
Avatar
ok i'm back
10:29 PM
time to try
Avatar
Master of ROP Translation 6/15/2024 10:29 PM
we can take The Unstable char like ImP(, Ref(, Rref(?
Avatar
stop calling it unstable char
10:30 PM
its unavailable char
Avatar
Master of ROP Translation 6/15/2024 10:30 PM
ahh sry
10:31 PM
unavailable char
10:31 PM
also who entered 186an success?
Avatar
me
Avatar
telecomadm1145 6/15/2024 10:31 PM
also me
10:32 PM
just a long while ago
10:32 PM
entering math68 is kind of suffering
Avatar
Avatar
telecomadm1145
entering math68 is kind of suffering
telecomadm1145 6/15/2024 10:32 PM
must type 128 numbers exactly
Avatar
alright, got math 68
10:33 PM
with fdfd c0
10:33 PM
186an time
Avatar
Avatar
Master of ROP Translation
we can take The Unstable char like ImP(, Ref(, Rref(?
telecomadm1145 6/15/2024 10:35 PM
can you also try that
10:35 PM
or you can't get you cwii now
Avatar
Master of ROP Translation 6/15/2024 10:37 PM
Ij wihll try that
Avatar
why????
10:39 PM
i swear i have entered 186an
10:39 PM
and it acts like its not in any an mode
Avatar
telecomadm1145 6/15/2024 10:42 PM
wtf
Avatar
Master of ROP Translation 6/15/2024 10:42 PM
wtf
10:42 PM
I also failed
Avatar
telecomadm1145 6/15/2024 10:42 PM
just cleared the input area
Avatar
its so weird
Avatar
telecomadm1145 6/15/2024 10:42 PM
very weird
10:43 PM
wont be solved until 880btg get dumped
Avatar
Master of ROP Translation 6/15/2024 10:43 PM
someone know where is the input area on CWII?
10:43 PM
i forgot
10:44 PM
@Steveyboi
Avatar
telecomadm1145 6/15/2024 10:44 PM
0x9268
👍 1
Avatar
Master of ROP Translation 6/15/2024 10:45 PM
okay thanks :)
Avatar
telecomadm1145 6/15/2024 10:45 PM
ez to remember
Avatar
its that easy
10:45 PM
8140 8154 D180 9268
10:45 PM
ES ES+ CWI CWII
Avatar
telecomadm1145 6/15/2024 10:45 PM
cwii's address is the simplest
Avatar
92 from french models, 68 from mode 68 noice
Avatar
telecomadm1145 6/15/2024 10:47 PM
there might be cch/fxesms member in casio
Avatar
maybe
Avatar
Master of ROP Translation 6/15/2024 10:48 PM
10:48 PM
i just know how to take these unavailable char in MathI/O :P
Avatar
telecomadm1145 6/15/2024 10:49 PM
have you succeed?
10:49 PM
or other method
Avatar
Master of ROP Translation 6/15/2024 10:49 PM
success with other method
10:49 PM
I ask the input area on purpose:))
Avatar
is it something 4D
Avatar
Master of ROP Translation 6/15/2024 10:49 PM
I use another method to take it
10:49 PM
it was Xyzst method noice
Avatar
Avatar
Steveyboi
is it something 4D
telecomadm1145 6/15/2024 10:50 PM
impossible to have 4d things again
Avatar
right
10:50 PM
forgot
10:50 PM
4D is B imag
Avatar
telecomadm1145 6/15/2024 10:50 PM
the memory layout is completely different
10:50 PM
also no "CALC"
Avatar
fx-880BTG has CALC actually
👍 1
Avatar
Avatar
Master of ROP Translation
it was Xyzst method noice
telecomadm1145 6/15/2024 10:50 PM
memcpy ig?
Avatar
Master of ROP Translation 6/15/2024 10:50 PM
variable thing
Avatar
telecomadm1145 6/15/2024 10:51 PM
variable memcpy
👍 1
10:51 PM
i did that before lol
Avatar
Master of ROP Translation 6/15/2024 10:53 PM
now i'll try putting these chars to LineI/O
10:53 PM
hope this works
Avatar
telecomadm1145 6/15/2024 10:54 PM
@Steveyboi what will happen if casio blocked fd20+ and a b r
10:54 PM
these things can be blocked easily
10:54 PM
just check index in range
Avatar
Avatar
telecomadm1145
@Steveyboi what will happen if casio blocked fd20+ and a b r
no more an ig
10:55 PM
probably no more glitch
Avatar
telecomadm1145 6/15/2024 10:56 PM
now rop in cwii and cwx basically are based on an
10:56 PM
might need esp style rop chain again
Avatar
Avatar
Steveyboi
probably no more glitch
telecomadm1145 6/15/2024 10:57 PM
if casio didnt block reset68,we can still corrupt stack by frac bug
Avatar
Master of ROP Translation 6/15/2024 10:57 PM
yea
Avatar
definitely
Avatar
The Administrator 6/15/2024 11:12 PM
ironically, the fx-5800P is sort of like that reg chars don't corrupt the stack even if you use a hex editor to input them in COMP mode even if you use a hex editor to input more than 128 bytes, nothing interesting will happen if you press [=] if you use a hex editor to manually set mode byte to 00h (normally mode 68), the calculator will act like it is in SYSTEM mode
Avatar
Avatar
The Administrator
ironically, the fx-5800P is sort of like that reg chars don't corrupt the stack even if you use a hex editor to input them in COMP mode even if you use a hex editor to input more than 128 bytes, nothing interesting will happen if you press [=] if you use a hex editor to manually set mode byte to 00h (normally mode 68), the calculator will act like it is in SYSTEM mode
telecomadm1145 6/16/2024 12:00 AM
Hardest to hack ig
Avatar
@Master of ROP Translation can you send trippyspell inj script?
Avatar
Avatar
Master of ROP Translation
but what is Math68? The first time i hear it
what you do first when spelling in 880btg(cwii)
Avatar
i plan to change my memory mapping in my emulator to individual addresses
12:48 PM
what addresses should i map
Avatar
Avatar
Steveyboi
what addresses should i map
ROM window, RAM, VRAM and all individual SFRs
Avatar
i mean SFR addresses
Avatar
Idk, maybe as many as we know now
Avatar
uint16_t MMU::ReadCode(size_t offset) { if (offset >= (1 << 20)) PANIC("offset doesn't fit 20 bits\n"); if (offset & 1) PANIC("offset has LSB set\n"); size_t segment_index = offset >> 16; size_t segment_offset = offset & 0xFFFF; if (!segment_index) return (((uint16_t)emulator.chipset.rom_data[segment_offset + 1]) << 8) | emulator.chipset.rom_data[segment_offset]; MemoryByte *segment = segment_dispatch[segment_index]; if (!segment) { emulator.HandleMemoryError(); return 0; } MMURegion *region = segment[segment_offset].region; if (!region) { emulator.HandleMemoryError(); return 0; } return (((uint16_t)region->read(region, offset + 1)) << 8) | region->read(region, offset); } why reading code from other than segment 0 is actually reading data memory
Avatar
telecomadm1145 6/18/2024 2:18 PM
idk
2:19 PM
also ram except seg 0 is mapped to rom
2:19 PM
idk why
Avatar
Avatar
telecomadm1145
also ram except seg 0 is mapped to rom
Isn't U8/U16 designed to read code segments when accessing data seg 1+?
3:12 PM
I mean data & code seg 1+ are mapped to the same address space
Avatar
not really
Avatar
Avatar
ArNeKJ
Isn't U8/U16 designed to read code segments when accessing data seg 1+?
telecomadm1145 6/18/2024 3:14 PM
idk,but like fx5800p's flash is mapped to seg8-F,doesnt make sense
3:15 PM
also fx5800p has a ram at 0x40000 (edited)
3:15 PM
seg4
Avatar
Avatar
Steveyboi
not really
Example?
Avatar
unmapped data segments
4:36 PM
like xyzst discovered
Avatar
Hmm... What will happen if you access the same address via program memory space?
4:46 PM
(say, jump to those address and see if the results match)
Avatar
telecomadm1145 6/18/2024 4:47 PM
xyzst should did some of them
4:47 PM
these unmapped segments are weird
4:48 PM
reading through memcpy will break the mcu
Avatar
Avatar
ArNeKJ
Isn't U8/U16 designed to read code segments when accessing data seg 1+?
its just casio did this ig
Avatar
Avatar
ArNeKJ
Hmm... What will happen if you access the same address via program memory space?
actually (on cwii) they're segments indexed above 0x0F, which are out of code segments range
Avatar
Avatar
Xyzst
actually (on cwii) they're segments indexed above 0x0F, which are out of code segments range
So, data segments above 0x0F are not simply mirrows of code segments 0x0-0xF, but their own segments, right?
Avatar
Avatar
telecomadm1145
reading through memcpy will break the mcu
So weird
Avatar
Hey! Not too sure if this is the right channel but here I go: I was wondering how easy (and how I would go about doing it) would it be to run an emulation or just the .bin file (or whatever it is 😭I’m still learning) on an arduino. I assume it it’ll need to be somewhat powerful so I was thinking like an ESP? I wanted to simulate or just run the FX991ex on an arduino
Avatar
first
2:15 PM
you need to make the emulator
Avatar
991ex
2:16 PM
use esp
Avatar
Avatar
totalynce
use esp
nah fx-991EX is fine
Avatar
Avatar
Steveyboi
you need to make the emulator
emulate the core first
2:16 PM
it is a Lapis nX-U16 core
2:16 PM
use this
Avatar
Avatar
chromy
Hey! Not too sure if this is the right channel but here I go: I was wondering how easy (and how I would go about doing it) would it be to run an emulation or just the .bin file (or whatever it is 😭I’m still learning) on an arduino. I assume it it’ll need to be somewhat powerful so I was thinking like an ESP? I wanted to simulate or just run the FX991ex on an arduino
telecomadm1145 6/19/2024 2:29 PM
its pretty simple
2:30 PM
if u dont want to impl urself,u can use simu8/u8-core or casioemu as the core
Avatar
*u8_emu
Avatar
update io ports stuff to casioemux
3:20 PM
ignore the incomplete 5800p things
Avatar
Avatar
Xyzst
update io ports stuff to casioemux
telecomadm1145 6/19/2024 3:20 PM
what sfrs are updated
Avatar
F048-F04C, F220-F224(F225 in cwii)
Avatar
Avatar
Steveyboi
*u8_emu
So if I were to use u8 I would have to map the display to an equivalent on arduino right? But apart from that is there anything else I’m overlooking? Keyboard too haha
Avatar
telecomadm1145 6/19/2024 3:26 PM
matrix kb is ez
3:26 PM
you can even directly let the rom access the keyboard,it will do the kb things for u
Avatar
Avatar
Xyzst
update io ports stuff to casioemux
for somehow now 5800p wont boot
Avatar
telecomadm1145 6/19/2024 3:29 PM
ig the ko things
3:29 PM
and f046 (edited)
3:29 PM
stevey set f046 to 4 (edited)
Avatar
Avatar
Xyzst
F048-F04C, F220-F224(F225 in cwii)
has anyone tested with volt meter what happenns when writing to these sfrs?
Avatar
isnt it F044 in 5800p
3:31 PM
inverted
Avatar
telecomadm1145 6/19/2024 3:33 PM
huh i remembered this wrong
Avatar
Avatar
telecomadm1145
stevey set f046 to 4 (edited)
telecomadm1145 6/19/2024 3:33 PM
3:34 PM
it wont boot when set to 0
Avatar
i guess thats the port0 data register in 5800p
3:35 PM
a 2-byte shift
3:36 PM
well setting P03 to H level in advance results in raising EXI3INT which also gets it to crash
Avatar
merge time
Avatar
telecomadm1145 6/19/2024 3:37 PM
all conflicts lol
Avatar
Avatar
Xyzst
well setting P03 to H level in advance results in raising EXI3INT which also gets it to crash
because i set the pin level on reset when F018h is 0
Avatar
ok i fixed all the conflicts
3:39 PM
just build.bat and command.cpp need fixing
Avatar
during normal running F018h is 0xC3 and a H level of P03 wont raise EXI3INT
Avatar
Avatar
Steveyboi
ok i fixed all the conflicts
telecomadm1145 6/19/2024 3:39 PM
can u merge my gui in
Avatar
Avatar
Xyzst
well setting P03 to H level in advance results in raising EXI3INT which also gets it to crash
telecomadm1145 6/19/2024 3:40 PM
is p03 labeled on pcb?
Avatar
i guess not
Avatar
telecomadm1145 6/19/2024 3:40 PM
or where it is
Avatar
should be next to the pins it used to 'transfer data'
Avatar
Avatar
telecomadm1145
can u merge my gui in
here the first problem mem_edit.ReadFn = [](const ImU8* data, size_t off) -> ImU8 { return me_mmu->ReadData(off + 0x9000); }; mem_edit.WriteFn = [](ImU8* data, size_t off, ImU8 d) { return me_mmu->WriteData(off + 0x9000, d); }; size_t v = 0x9188;
3:42 PM
hard-coded CWII addresses
Avatar
telecomadm1145 6/19/2024 3:43 PM
where
Avatar
Command.cpp line 74
Avatar
telecomadm1145 6/19/2024 3:43 PM
no
3:43 PM
thats old version
Avatar
oh
3:43 PM
lemme pull
Avatar
telecomadm1145 6/19/2024 3:43 PM
Avatar
oh you rename it to Ui.cpp now
Avatar
telecomadm1145 6/19/2024 3:44 PM
yeah
3:45 PM
also if u want memory breakpoint work,please check mmu things
3:46 PM
keylog is still cwii only,since im lazy to edit font file (edited)
3:46 PM
so just dont merge that
Avatar
oh no chinese comments
Avatar
Avatar
Steveyboi
oh no chinese comments
telecomadm1145 6/19/2024 3:46 PM
just delete them
3:48 PM
i used #if to support multi language
Avatar
yeah i see it
3:53 PM
In file included from src/Gui/imgui/imgui.h:85, from src/Gui/imgui/imgui_impl_sdl2.h:22, from src/casioemu.cpp:2: src/Gui/hex.hpp: In member function 'void MemoryEditor::DrawContents(void*, size_t, size_t, const OptionalMarkedSpans&)': src/Gui/hex.hpp:579:68: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and 'int' [-Wsign-compare] 579 | assert(intxn_start >= line_start_n && intxn_end <= line_end_n); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/Gui/hex.hpp:579:97: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and 'int' [-Wsign-compare] 579 | assert(intxn_start >= line_start_n && intxn_end <= line_end_n); | ~~~~~~~~~~^~~~~~~~~~~~~
3:53 PM
its a warning
Avatar
Avatar
telecomadm1145
matrix kb is ez
Sorry, what’s that?
Avatar
oh like
3:53 PM
the keyboard uses a matrix style
Avatar
except ON key
3:54 PM
that is not (really) part of the keyboard
3:54 PM
its basically a reset switch
Avatar
Idk why I want to really get the fx911 on the arduino but idk if that’s too big of a challenge? I took a look at u8 and it looks cool despite not understanding it: I get the part where you give it the Rom, then I assume that translates all the nmumonics ect, but I don’t know how I’m going to get the translated ones to do anything on the arduino and for it to display anything. Sorry I’m rambling, but I’d love to hear any ideas
Avatar
yeah
3:57 PM
you should use this fork though https://github.com/gamingwithevets/u8_emu
3:57 PM
the fx-991EX uses U16, an upgraded version of U8
3:58 PM
this fork has a "U16 mode" toggle
Avatar
Ah ok thanks, and so essentially to get this running on the arduino I’d only have to rewrite main and peripheral?
Avatar
uh yeah
3:59 PM
you could also not use the existing frontend at all
Avatar
as in the UI of the 991?
Avatar
uh ye
Avatar
I thought that would be built in to the Rom and so anything I run in the arduino would end up looking kinda similiar?
Avatar
yea
4:00 PM
the UI is in the ROM
Avatar
So what is the front end?
Avatar
the root of src directory
4:01 PM
the core directory is what you need
4:01 PM
the frontend is not for fx-991EX
Avatar
Avatar
Steveyboi
this fork has a "U16 mode" toggle
also in casioemux
4:01 PM
the latest commit
Avatar
is it on by default
4:02 PM
or
Avatar
set by hardware id
Avatar
yeah knew it
Avatar
Avatar
Steveyboi
the core directory is what you need
Ok but like if I were to “run” that by itself, what would the output be? Just pixels for the screen? And it would be waiting for input? Or would it be functions that I would have to adapt more
4:04 PM
I’m just not fully understanding how emulation works despite reading a shit ton about emus elsewhere
Avatar
it has both input and output
Avatar
What would the output be?
4:06 PM
And last question before my flight takes off lmao. would this take a long time? Aka more than a week? If so I give up ahhaa
Avatar
Avatar
chromy
What would the output be?
screen
Avatar
Avatar
chromy
And last question before my flight takes off lmao. would this take a long time? Aka more than a week? If so I give up ahhaa
telecomadm1145 6/19/2024 4:07 PM
if youre experienced,it would take about 1 day
4:07 PM
its really simple
4:07 PM
tho the microprocessor might not be fast enough
Avatar
Avatar
Steveyboi
screen
Perfect so for now I should just try and get it to output to some shitty oled?
Avatar
Avatar
telecomadm1145
tho the microprocessor might not be fast enough
Even an esp?
Avatar
telecomadm1145 6/19/2024 4:08 PM
yeah,its a emulator (edited)
Avatar
Thanks for all your help guys. My flights off
Avatar
Avatar
chromy
Perfect so for now I should just try and get it to output to some shitty oled?
yeah ig
Avatar
Avatar
telecomadm1145
yeah,its a emulator (edited)
Ah ok, I thought it would be rather light weight
4:08 PM
But now that I think about it
4:08 PM
Ahha
4:08 PM
It makes sense
4:08 PM
Again, thank you so much!
Avatar
got this to work
👍 1
11:18 AM
still not very good
Avatar
Master of ROP Translation 6/20/2024 11:47 AM
woah
11:47 AM
you implemented it?
Avatar
telecom probably allready supported it
Avatar
Avatar
Master of ROP Translation
you implemented it?
it also kinda works on mine but it flashes a lot
10:31 PM
@Xyzst is it the same for you when you don't screenshot it? I don't know how it looks irl
Avatar
Avatar
boxy
it also kinda works on mine but it flashes a lot
i didn't draw it very well lol
10:35 PM
Avatar
wtf
9:46 PM
today i decide to move some python code to C in my emulator again
9:47 PM
and now is this thing
9:47 PM
funcptr
Avatar
telecomadm1145 6/22/2024 10:13 PM
Like the funcptr is a hanging ptr
Avatar
i (kinda) fixed it by setting the pointer's contents instead of the pointer itself
Avatar
telecomadm1145 6/22/2024 10:14 PM
Or a not inited value
Avatar
Avatar
Steveyboi
i (kinda) fixed it by setting the pointer's contents instead of the pointer itself
(actually thats a different bug that i already fixed) (edited)
Avatar
ok so
2:02 PM
i pretty much fixed all the errors of my new half-C implementation
2:02 PM
i also moved the peripherals to seperate scripts
2:03 PM
also made a new system for the real screen (the screen buffers still use the old system)
Avatar
i just updated https://github.com/fxesdev/CasioEmuX to use symlinks with submodules for imgui
Avatar
we got fx-82CN X real ROM, dumped with flash
👍 1
Avatar
fx-92+ SC ROM when
Avatar
too many models (edited)
Avatar
so good
Avatar
fx-92+ Spéciale Collège!!!!
👍 2
Exported 10,323 message(s)
Timezone: UTC+7